aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def')
-rw-r--r--crates/hir_def/src/item_scope.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/hir_def/src/item_scope.rs b/crates/hir_def/src/item_scope.rs
index 99820c275..12c24e1ca 100644
--- a/crates/hir_def/src/item_scope.rs
+++ b/crates/hir_def/src/item_scope.rs
@@ -270,15 +270,12 @@ impl ItemScope {
270 270
271 /// Marks everything that is not a procedural macro as private to `this_module`. 271 /// Marks everything that is not a procedural macro as private to `this_module`.
272 pub(crate) fn censor_non_proc_macros(&mut self, this_module: ModuleId) { 272 pub(crate) fn censor_non_proc_macros(&mut self, this_module: ModuleId) {
273 for vis in self 273 self.types
274 .types
275 .values_mut() 274 .values_mut()
276 .chain(self.values.values_mut()) 275 .chain(self.values.values_mut())
277 .map(|(_, v)| v) 276 .map(|(_, v)| v)
278 .chain(self.unnamed_trait_imports.values_mut()) 277 .chain(self.unnamed_trait_imports.values_mut())
279 { 278 .for_each(|vis| *vis = Visibility::Module(this_module));
280 *vis = Visibility::Module(this_module);
281 }
282 279
283 for (mac, vis) in self.macros.values_mut() { 280 for (mac, vis) in self.macros.values_mut() {
284 if let MacroDefKind::ProcMacro(_) = mac.kind { 281 if let MacroDefKind::ProcMacro(_) = mac.kind {