aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/nameres
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-04-09 13:46:52 +0100
committerJonas Schievink <[email protected]>2021-04-09 13:46:52 +0100
commit4ea5f690bc2692699208999f46a85a9872cbfc73 (patch)
treef0437e6259652d32a858237edd32f5430f644084 /crates/hir_def/src/nameres
parent99ed68a109c9f7e0dc6a82ccb5bf854d60943957 (diff)
Undo path resolution hack for extern prelude
We don't populate the extern prelude for block DefMaps anymore, so this is unnecessary
Diffstat (limited to 'crates/hir_def/src/nameres')
-rw-r--r--crates/hir_def/src/nameres/path_resolution.rs13
1 files changed, 4 insertions, 9 deletions
diff --git a/crates/hir_def/src/nameres/path_resolution.rs b/crates/hir_def/src/nameres/path_resolution.rs
index 60471937c..a9cf651d2 100644
--- a/crates/hir_def/src/nameres/path_resolution.rs
+++ b/crates/hir_def/src/nameres/path_resolution.rs
@@ -384,15 +384,10 @@ impl DefMap {
384 } 384 }
385 } 385 }
386 }; 386 };
387 // Give precedence to names in outer `DefMap`s over the extern prelude; only check prelude 387 let from_extern_prelude = self
388 // from the crate DefMap. 388 .extern_prelude
389 let from_extern_prelude = match self.block { 389 .get(name)
390 Some(_) => PerNs::none(), 390 .map_or(PerNs::none(), |&it| PerNs::types(it, Visibility::Public));
391 None => self
392 .extern_prelude
393 .get(name)
394 .map_or(PerNs::none(), |&it| PerNs::types(it, Visibility::Public)),
395 };
396 391
397 let from_prelude = self.resolve_in_prelude(db, name); 392 let from_prelude = self.resolve_in_prelude(db, name);
398 393