aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_db')
-rw-r--r--crates/ide_db/src/search.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/ide_db/src/search.rs b/crates/ide_db/src/search.rs
index 324817cd0..8e93de277 100644
--- a/crates/ide_db/src/search.rs
+++ b/crates/ide_db/src/search.rs
@@ -245,9 +245,7 @@ impl Definition {
245 } 245 }
246 246
247 if let Some(Visibility::Public) = vis { 247 if let Some(Visibility::Public) = vis {
248 let source_root_id = db.file_source_root(file_id); 248 let mut res = FxHashMap::default();
249 let source_root = db.source_root(source_root_id);
250 let mut res = source_root.iter().map(|id| (id, None)).collect::<FxHashMap<_, _>>();
251 249
252 let krate = module.krate(); 250 let krate = module.krate();
253 for rev_dep in krate.transitive_reverse_dependencies(db) { 251 for rev_dep in krate.transitive_reverse_dependencies(db) {