diff options
Diffstat (limited to 'crates/hir_def/src/nameres')
-rw-r--r-- | crates/hir_def/src/nameres/collector.rs | 2 | ||||
-rw-r--r-- | crates/hir_def/src/nameres/path_resolution.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs index cd68efbe6..adfcf879a 100644 --- a/crates/hir_def/src/nameres/collector.rs +++ b/crates/hir_def/src/nameres/collector.rs | |||
@@ -578,7 +578,7 @@ impl DefCollector<'_> { | |||
578 | } else if m.krate != self.def_map.krate { | 578 | } else if m.krate != self.def_map.krate { |
579 | mark::hit!(glob_across_crates); | 579 | mark::hit!(glob_across_crates); |
580 | // glob import from other crate => we can just import everything once | 580 | // glob import from other crate => we can just import everything once |
581 | let item_map = self.db.crate_def_map(m.krate); | 581 | let item_map = m.def_map(self.db); |
582 | let scope = &item_map[m.local_id].scope; | 582 | let scope = &item_map[m.local_id].scope; |
583 | 583 | ||
584 | // Module scoped macros is included | 584 | // Module scoped macros is included |
diff --git a/crates/hir_def/src/nameres/path_resolution.rs b/crates/hir_def/src/nameres/path_resolution.rs index ec90f4e65..82528b792 100644 --- a/crates/hir_def/src/nameres/path_resolution.rs +++ b/crates/hir_def/src/nameres/path_resolution.rs | |||
@@ -243,7 +243,7 @@ impl DefMap { | |||
243 | kind: PathKind::Super(0), | 243 | kind: PathKind::Super(0), |
244 | }; | 244 | }; |
245 | log::debug!("resolving {:?} in other crate", path); | 245 | log::debug!("resolving {:?} in other crate", path); |
246 | let defp_map = db.crate_def_map(module.krate); | 246 | let defp_map = module.def_map(db); |
247 | let (def, s) = defp_map.resolve_path(db, module.local_id, &path, shadow); | 247 | let (def, s) = defp_map.resolve_path(db, module.local_id, &path, shadow); |
248 | return ResolvePathResult::with( | 248 | return ResolvePathResult::with( |
249 | def, | 249 | def, |
@@ -356,7 +356,7 @@ impl DefMap { | |||
356 | self | 356 | self |
357 | } else { | 357 | } else { |
358 | // Extend lifetime | 358 | // Extend lifetime |
359 | keep = db.crate_def_map(prelude.krate); | 359 | keep = prelude.def_map(db); |
360 | &keep | 360 | &keep |
361 | }; | 361 | }; |
362 | def_map[prelude.local_id].scope.get(name) | 362 | def_map[prelude.local_id].scope.get(name) |