From 2ce1aa32c40e68ea905c83c315bddfcdd1b7ae26 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 20 Dec 2019 15:45:12 +0100 Subject: Rename ModuleScope -> ItemScope --- crates/ra_hir_def/src/item_scope.rs | 4 ++-- crates/ra_hir_def/src/nameres.rs | 4 ++-- 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; use crate::{per_ns::PerNs, BuiltinType, LocalImportId, MacroDefId, ModuleDefId, TraitId}; #[derive(Debug, Default, PartialEq, Eq)] -pub struct ModuleScope { +pub struct ItemScope { pub(crate) items: FxHashMap, /// Macros visible in current module in legacy textual scope /// @@ -45,7 +45,7 @@ pub enum BuiltinShadowMode { /// Legacy macros can only be accessed through special methods like `get_legacy_macros`. /// Other methods will only resolve values, types and module scoped macros only. -impl ModuleScope { +impl ItemScope { pub fn entries<'a>(&'a self) -> impl Iterator + 'a { //FIXME: shadowing 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; use crate::{ db::DefDatabase, - item_scope::{BuiltinShadowMode, ModuleScope}, + item_scope::{BuiltinShadowMode, ItemScope}, nameres::{diagnostics::DefDiagnostic, path_resolution::ResolveMode}, path::ModPath, per_ns::PerNs, @@ -165,7 +165,7 @@ impl ModuleOrigin { pub struct ModuleData { pub parent: Option, pub children: FxHashMap, - pub scope: ModuleScope, + pub scope: ItemScope, /// Where does this module come from? pub origin: ModuleOrigin, -- cgit v1.2.3