aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/resolver.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/resolver.rs')
-rw-r--r--crates/ra_hir_def/src/resolver.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/resolver.rs b/crates/ra_hir_def/src/resolver.rs
index 5155365cc..0847f6dcf 100644
--- a/crates/ra_hir_def/src/resolver.rs
+++ b/crates/ra_hir_def/src/resolver.rs
@@ -325,7 +325,7 @@ impl Resolver {
325 if let Scope::ModuleScope(m) = scope { 325 if let Scope::ModuleScope(m) = scope {
326 if let Some(prelude) = m.crate_def_map.prelude { 326 if let Some(prelude) = m.crate_def_map.prelude {
327 let prelude_def_map = db.crate_def_map(prelude.krate); 327 let prelude_def_map = db.crate_def_map(prelude.krate);
328 traits.extend(prelude_def_map[prelude.module_id].scope.traits()); 328 traits.extend(prelude_def_map[prelude.local_id].scope.traits());
329 } 329 }
330 traits.extend(m.crate_def_map[m.module_id].scope.traits()); 330 traits.extend(m.crate_def_map[m.module_id].scope.traits());
331 } 331 }
@@ -402,7 +402,7 @@ impl Scope {
402 }); 402 });
403 if let Some(prelude) = m.crate_def_map.prelude { 403 if let Some(prelude) = m.crate_def_map.prelude {
404 let prelude_def_map = db.crate_def_map(prelude.krate); 404 let prelude_def_map = db.crate_def_map(prelude.krate);
405 prelude_def_map[prelude.module_id].scope.entries().for_each(|(name, res)| { 405 prelude_def_map[prelude.local_id].scope.entries().for_each(|(name, res)| {
406 f(name.clone(), ScopeDef::PerNs(res.def)); 406 f(name.clone(), ScopeDef::PerNs(res.def));
407 }); 407 });
408 } 408 }
@@ -492,7 +492,7 @@ pub trait HasResolver: Copy {
492impl HasResolver for ModuleId { 492impl HasResolver for ModuleId {
493 fn resolver(self, db: &impl DefDatabase) -> Resolver { 493 fn resolver(self, db: &impl DefDatabase) -> Resolver {
494 let def_map = db.crate_def_map(self.krate); 494 let def_map = db.crate_def_map(self.krate);
495 Resolver::default().push_module_scope(def_map, self.module_id) 495 Resolver::default().push_module_scope(def_map, self.local_id)
496 } 496 }
497} 497}
498 498