From 7208498d54b9f3d386b58f901c911a35170057ce Mon Sep 17 00:00:00 2001 From: Josh Mcguigan Date: Tue, 10 Mar 2020 19:58:17 -0700 Subject: fix issue 3444 --- crates/ra_hir/src/semantics.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'crates/ra_hir/src/semantics.rs') diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs index 3782a9984..e83eb1fdc 100644 --- a/crates/ra_hir/src/semantics.rs +++ b/crates/ra_hir/src/semantics.rs @@ -344,7 +344,13 @@ impl<'a, DB: HirDatabase> SemanticsScope<'a, DB> { resolver.process_all_names(self.db, &mut |name, def| { let def = match def { - resolver::ScopeDef::PerNs(it) => it.into(), + resolver::ScopeDef::PerNs(it) => { + let items = ScopeDef::all_items(it); + for item in items { + f(name.clone(), item); + } + return + }, resolver::ScopeDef::ImplSelfType(it) => ScopeDef::ImplSelfType(it.into()), resolver::ScopeDef::AdtSelfType(it) => ScopeDef::AdtSelfType(it.into()), resolver::ScopeDef::GenericParam(id) => ScopeDef::GenericParam(TypeParam { id }), -- cgit v1.2.3