aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r--crates/ra_hir_def/src/item_scope.rs4
-rw-r--r--crates/ra_hir_def/src/nameres.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir_def/src/item_scope.rs b/crates/ra_hir_def/src/item_scope.rs
index 3c042a94e..62c878313 100644
--- a/crates/ra_hir_def/src/item_scope.rs
+++ b/crates/ra_hir_def/src/item_scope.rs
@@ -8,7 +8,7 @@ use rustc_hash::FxHashMap;
8use crate::{per_ns::PerNs, BuiltinType, LocalImportId, MacroDefId, ModuleDefId, TraitId}; 8use crate::{per_ns::PerNs, BuiltinType, LocalImportId, MacroDefId, ModuleDefId, TraitId};
9 9
10#[derive(Debug, Default, PartialEq, Eq)] 10#[derive(Debug, Default, PartialEq, Eq)]
11pub struct ModuleScope { 11pub struct ItemScope {
12 pub(crate) items: FxHashMap<Name, Resolution>, 12 pub(crate) items: FxHashMap<Name, Resolution>,
13 /// Macros visible in current module in legacy textual scope 13 /// Macros visible in current module in legacy textual scope
14 /// 14 ///
@@ -45,7 +45,7 @@ pub enum BuiltinShadowMode {
45 45
46/// Legacy macros can only be accessed through special methods like `get_legacy_macros`. 46/// Legacy macros can only be accessed through special methods like `get_legacy_macros`.
47/// Other methods will only resolve values, types and module scoped macros only. 47/// Other methods will only resolve values, types and module scoped macros only.
48impl ModuleScope { 48impl ItemScope {
49 pub fn entries<'a>(&'a self) -> impl Iterator<Item = (&'a Name, &'a Resolution)> + 'a { 49 pub fn entries<'a>(&'a self) -> impl Iterator<Item = (&'a Name, &'a Resolution)> + 'a {
50 //FIXME: shadowing 50 //FIXME: shadowing
51 self.items.iter().chain(BUILTIN_SCOPE.iter()) 51 self.items.iter().chain(BUILTIN_SCOPE.iter())
diff --git a/crates/ra_hir_def/src/nameres.rs b/crates/ra_hir_def/src/nameres.rs
index 0b486ce16..3b318719e 100644
--- a/crates/ra_hir_def/src/nameres.rs
+++ b/crates/ra_hir_def/src/nameres.rs
@@ -69,7 +69,7 @@ use rustc_hash::FxHashMap;
69 69
70use crate::{ 70use crate::{
71 db::DefDatabase, 71 db::DefDatabase,
72 item_scope::{BuiltinShadowMode, ModuleScope}, 72 item_scope::{BuiltinShadowMode, ItemScope},
73 nameres::{diagnostics::DefDiagnostic, path_resolution::ResolveMode}, 73 nameres::{diagnostics::DefDiagnostic, path_resolution::ResolveMode},
74 path::ModPath, 74 path::ModPath,
75 per_ns::PerNs, 75 per_ns::PerNs,
@@ -165,7 +165,7 @@ impl ModuleOrigin {
165pub struct ModuleData { 165pub struct ModuleData {
166 pub parent: Option<LocalModuleId>, 166 pub parent: Option<LocalModuleId>,
167 pub children: FxHashMap<Name, LocalModuleId>, 167 pub children: FxHashMap<Name, LocalModuleId>,
168 pub scope: ModuleScope, 168 pub scope: ItemScope,
169 169
170 /// Where does this module come from? 170 /// Where does this module come from?
171 pub origin: ModuleOrigin, 171 pub origin: ModuleOrigin,