aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/nameres
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/nameres')
-rw-r--r--crates/hir_def/src/nameres/path_resolution.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_def/src/nameres/path_resolution.rs b/crates/hir_def/src/nameres/path_resolution.rs
index 2d1477160..ecf75c777 100644
--- a/crates/hir_def/src/nameres/path_resolution.rs
+++ b/crates/hir_def/src/nameres/path_resolution.rs
@@ -152,7 +152,7 @@ impl DefMap {
152 PathKind::DollarCrate(krate) => { 152 PathKind::DollarCrate(krate) => {
153 if krate == self.krate { 153 if krate == self.krate {
154 mark::hit!(macro_dollar_crate_self); 154 mark::hit!(macro_dollar_crate_self);
155 PerNs::types(self.module_id(self.root).into(), Visibility::Public) 155 PerNs::types(self.crate_root().into(), Visibility::Public)
156 } else { 156 } else {
157 let def_map = db.crate_def_map(krate); 157 let def_map = db.crate_def_map(krate);
158 let module = def_map.module_id(def_map.root); 158 let module = def_map.module_id(def_map.root);
@@ -160,7 +160,7 @@ impl DefMap {
160 PerNs::types(module.into(), Visibility::Public) 160 PerNs::types(module.into(), Visibility::Public)
161 } 161 }
162 } 162 }
163 PathKind::Crate => PerNs::types(self.module_id(self.root).into(), Visibility::Public), 163 PathKind::Crate => PerNs::types(self.crate_root().into(), Visibility::Public),
164 // plain import or absolute path in 2015: crate-relative with 164 // plain import or absolute path in 2015: crate-relative with
165 // fallback to extern prelude (with the simplification in 165 // fallback to extern prelude (with the simplification in
166 // rust-lang/rust#57745) 166 // rust-lang/rust#57745)