From 699ce06ac3d857c7d4eaf01c523964f01d1b35f2 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Mon, 4 Feb 2019 22:09:56 +0100 Subject: Complete extern prelude (again) --- crates/ra_hir/src/nameres.rs | 2 +- crates/ra_hir/src/resolve.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs index 68df083d8..f9da6bc83 100644 --- a/crates/ra_hir/src/nameres.rs +++ b/crates/ra_hir/src/nameres.rs @@ -34,7 +34,7 @@ use crate::{ /// module, the set of visible items. #[derive(Default, Debug, PartialEq, Eq)] pub struct ItemMap { - extern_prelude: FxHashMap, + pub(crate) extern_prelude: FxHashMap, per_module: ArenaMap, } diff --git a/crates/ra_hir/src/resolve.rs b/crates/ra_hir/src/resolve.rs index 6c87d0df7..5ca7bacb5 100644 --- a/crates/ra_hir/src/resolve.rs +++ b/crates/ra_hir/src/resolve.rs @@ -197,7 +197,10 @@ impl Scope { .entries() .for_each(|(name, res)| { f(name.clone(), res.def.map(Resolution::Def)); - }) + }); + m.item_map.extern_prelude.iter().for_each(|(name, def)| { + f(name.clone(), PerNs::types(Resolution::Def(*def))); + }); } Scope::GenericParams(gp) => { for param in &gp.params { -- cgit v1.2.3