Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/symbols.rs')
-rw-r--r--crates/hir/src/symbols.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/crates/hir/src/symbols.rs b/crates/hir/src/symbols.rs
index 1530e697a3..a9320fdda7 100644
--- a/crates/hir/src/symbols.rs
+++ b/crates/hir/src/symbols.rs
@@ -255,7 +255,7 @@ impl<'a> SymbolCollector<'a> {
};
let def_map = module_id.def_map(self.db);
- let scope = &def_map[module_id.local_id].scope;
+ let scope = &def_map[module_id].scope;
for impl_id in scope.impls() {
self.collect_from_impl(impl_id);
@@ -329,10 +329,7 @@ impl<'a> SymbolCollector<'a> {
// Descend into the blocks and enqueue collection of all modules within.
for (_, def_map) in body.blocks(self.db) {
for (id, _) in def_map.modules() {
- self.work.push(SymbolCollectorWork {
- module_id: def_map.module_id(id),
- parent: name.clone(),
- });
+ self.work.push(SymbolCollectorWork { module_id: id, parent: name.clone() });
}
}
}
@@ -451,7 +448,7 @@ impl<'a> SymbolCollector<'a> {
fn push_module(&mut self, module_id: ModuleId, name: &Name) {
let def_map = module_id.def_map(self.db);
- let module_data = &def_map[module_id.local_id];
+ let module_data = &def_map[module_id];
let Some(declaration) = module_data.origin.declaration() else { return };
let module = declaration.to_node(self.db);
let Some(name_node) = module.name() else { return };