diff options
Diffstat (limited to 'crates/ra_hir_def/src/item_scope.rs')
-rw-r--r-- | crates/ra_hir_def/src/item_scope.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_hir_def/src/item_scope.rs b/crates/ra_hir_def/src/item_scope.rs index ac56986cd..f51e97ef9 100644 --- a/crates/ra_hir_def/src/item_scope.rs +++ b/crates/ra_hir_def/src/item_scope.rs | |||
@@ -10,7 +10,7 @@ use crate::{per_ns::PerNs, BuiltinType, ImplId, LocalImportId, MacroDefId, Modul | |||
10 | #[derive(Debug, Default, PartialEq, Eq)] | 10 | #[derive(Debug, Default, PartialEq, Eq)] |
11 | pub struct ItemScope { | 11 | pub struct ItemScope { |
12 | items: FxHashMap<Name, Resolution>, | 12 | items: FxHashMap<Name, Resolution>, |
13 | pub(crate) impls: Vec<ImplId>, | 13 | impls: Vec<ImplId>, |
14 | /// Macros visible in current module in legacy textual scope | 14 | /// Macros visible in current module in legacy textual scope |
15 | /// | 15 | /// |
16 | /// For macros invoked by an unqualified identifier like `bar!()`, `legacy_macros` will be searched in first. | 16 | /// For macros invoked by an unqualified identifier like `bar!()`, `legacy_macros` will be searched in first. |
@@ -104,6 +104,10 @@ impl ItemScope { | |||
104 | self.legacy_macros.get(name).copied() | 104 | self.legacy_macros.get(name).copied() |
105 | } | 105 | } |
106 | 106 | ||
107 | pub(crate) fn define_impl(&mut self, imp: ImplId) { | ||
108 | self.impls.push(imp) | ||
109 | } | ||
110 | |||
107 | pub(crate) fn push_res( | 111 | pub(crate) fn push_res( |
108 | &mut self, | 112 | &mut self, |
109 | name: Name, | 113 | name: Name, |