aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2020-06-30 13:06:23 +0100
committerJonas Schievink <[email protected]>2020-06-30 13:06:23 +0100
commit7c9b3d154c4d826d4623891c69a60d1a69031e5b (patch)
treed6c4b7a6386eb475b424c33041f4d1307eabcb65
parenta80e8fea858ff789ed9fc490c2c1eb2b4eed6e82 (diff)
Remove `entries_without_primitives`
-rw-r--r--crates/ra_hir_def/src/item_scope.rs6
-rw-r--r--crates/ra_hir_def/src/resolver.rs8
2 files changed, 3 insertions, 11 deletions
diff --git a/crates/ra_hir_def/src/item_scope.rs b/crates/ra_hir_def/src/item_scope.rs
index c8dde6f8d..beeb98559 100644
--- a/crates/ra_hir_def/src/item_scope.rs
+++ b/crates/ra_hir_def/src/item_scope.rs
@@ -83,12 +83,6 @@ impl ItemScope {
83 keys.into_iter().map(move |name| (name, self.get(name))) 83 keys.into_iter().map(move |name| (name, self.get(name)))
84 } 84 }
85 85
86 pub fn entries_without_primitives<'a>(
87 &'a self,
88 ) -> impl Iterator<Item = (&'a Name, PerNs)> + 'a {
89 self.entries()
90 }
91
92 pub fn declarations(&self) -> impl Iterator<Item = ModuleDefId> + '_ { 86 pub fn declarations(&self) -> impl Iterator<Item = ModuleDefId> + '_ {
93 self.defs.iter().copied() 87 self.defs.iter().copied()
94 } 88 }
diff --git a/crates/ra_hir_def/src/resolver.rs b/crates/ra_hir_def/src/resolver.rs
index 15fdd9019..0bf51eb7b 100644
--- a/crates/ra_hir_def/src/resolver.rs
+++ b/crates/ra_hir_def/src/resolver.rs
@@ -511,11 +511,9 @@ impl Scope {
511 }); 511 });
512 } 512 }
513 } 513 }
514 Scope::LocalItemsScope(body) => { 514 Scope::LocalItemsScope(body) => body.item_scope.entries().for_each(|(name, def)| {
515 body.item_scope.entries_without_primitives().for_each(|(name, def)| { 515 f(name.clone(), ScopeDef::PerNs(def));
516 f(name.clone(), ScopeDef::PerNs(def)); 516 }),
517 })
518 }
519 Scope::GenericParams { params, def } => { 517 Scope::GenericParams { params, def } => {
520 for (local_id, param) in params.types.iter() { 518 for (local_id, param) in params.types.iter() {
521 if let Some(name) = &param.name { 519 if let Some(name) = &param.name {