aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2020-09-28 11:51:40 +0100
committerJonas Schievink <[email protected]>2020-09-28 11:51:40 +0100
commite799dbe5d7cc5d09ee5457595425cf2f42e1c113 (patch)
tree9824c6915b96101f0c594e60b720956197f79463
parent7474a42b001b0fea51f761173bd3e194b7901f75 (diff)
Simplify iterator chain
-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 {