From 4ea5f690bc2692699208999f46a85a9872cbfc73 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Fri, 9 Apr 2021 14:46:52 +0200 Subject: Undo path resolution hack for extern prelude We don't populate the extern prelude for block DefMaps anymore, so this is unnecessary --- crates/hir_def/src/nameres/path_resolution.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'crates/hir_def') 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 { } } }; - // Give precedence to names in outer `DefMap`s over the extern prelude; only check prelude - // from the crate DefMap. - let from_extern_prelude = match self.block { - Some(_) => PerNs::none(), - None => self - .extern_prelude - .get(name) - .map_or(PerNs::none(), |&it| PerNs::types(it, Visibility::Public)), - }; + let from_extern_prelude = self + .extern_prelude + .get(name) + .map_or(PerNs::none(), |&it| PerNs::types(it, Visibility::Public)); let from_prelude = self.resolve_in_prelude(db, name); -- cgit v1.2.3