diff options
author | Florian Diebold <[email protected]> | 2019-02-04 21:09:56 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-02-04 21:09:56 +0000 |
commit | 699ce06ac3d857c7d4eaf01c523964f01d1b35f2 (patch) | |
tree | 2c977fc1739141b95687f90b4934ac2e74e8b677 /crates/ra_hir/src | |
parent | ccef48b6c3a04b0104a68a947558994ea3e6a069 (diff) |
Complete extern prelude (again)
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/nameres.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/resolve.rs | 5 |
2 files changed, 5 insertions, 2 deletions
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::{ | |||
34 | /// module, the set of visible items. | 34 | /// module, the set of visible items. |
35 | #[derive(Default, Debug, PartialEq, Eq)] | 35 | #[derive(Default, Debug, PartialEq, Eq)] |
36 | pub struct ItemMap { | 36 | pub struct ItemMap { |
37 | extern_prelude: FxHashMap<Name, ModuleDef>, | 37 | pub(crate) extern_prelude: FxHashMap<Name, ModuleDef>, |
38 | per_module: ArenaMap<ModuleId, ModuleScope>, | 38 | per_module: ArenaMap<ModuleId, ModuleScope>, |
39 | } | 39 | } |
40 | 40 | ||
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 { | |||
197 | .entries() | 197 | .entries() |
198 | .for_each(|(name, res)| { | 198 | .for_each(|(name, res)| { |
199 | f(name.clone(), res.def.map(Resolution::Def)); | 199 | f(name.clone(), res.def.map(Resolution::Def)); |
200 | }) | 200 | }); |
201 | m.item_map.extern_prelude.iter().for_each(|(name, def)| { | ||
202 | f(name.clone(), PerNs::types(Resolution::Def(*def))); | ||
203 | }); | ||
201 | } | 204 | } |
202 | Scope::GenericParams(gp) => { | 205 | Scope::GenericParams(gp) => { |
203 | for param in &gp.params { | 206 | for param in &gp.params { |