Remove entries_without_primitives

This commit is contained in:
Jonas Schievink 2020-06-30 14:06:23 +02:00
parent a80e8fea85
commit 7c9b3d154c
2 changed files with 3 additions and 11 deletions

View file

@ -83,12 +83,6 @@ impl ItemScope {
keys.into_iter().map(move |name| (name, self.get(name)))
}
pub fn entries_without_primitives<'a>(
&'a self,
) -> impl Iterator<Item = (&'a Name, PerNs)> + 'a {
self.entries()
}
pub fn declarations(&self) -> impl Iterator<Item = ModuleDefId> + '_ {
self.defs.iter().copied()
}

View file

@ -511,11 +511,9 @@ impl Scope {
});
}
}
Scope::LocalItemsScope(body) => {
body.item_scope.entries_without_primitives().for_each(|(name, def)| {
f(name.clone(), ScopeDef::PerNs(def));
})
}
Scope::LocalItemsScope(body) => body.item_scope.entries().for_each(|(name, def)| {
f(name.clone(), ScopeDef::PerNs(def));
}),
Scope::GenericParams { params, def } => {
for (local_id, param) in params.types.iter() {
if let Some(name) = &param.name {