diff options
Diffstat (limited to 'crates/hir_def/src/body.rs')
-rw-r--r-- | crates/hir_def/src/body.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/crates/hir_def/src/body.rs b/crates/hir_def/src/body.rs index 41abd8f83..9a432f7d1 100644 --- a/crates/hir_def/src/body.rs +++ b/crates/hir_def/src/body.rs | |||
@@ -33,7 +33,7 @@ use crate::{ | |||
33 | nameres::DefMap, | 33 | nameres::DefMap, |
34 | path::{ModPath, Path}, | 34 | path::{ModPath, Path}, |
35 | src::HasSource, | 35 | src::HasSource, |
36 | AsMacroCall, DefWithBodyId, HasModule, Lookup, ModuleId, | 36 | AsMacroCall, DefWithBodyId, HasModule, LocalModuleId, Lookup, ModuleId, |
37 | }; | 37 | }; |
38 | 38 | ||
39 | /// A subset of Expander that only deals with cfg attributes. We only need it to | 39 | /// A subset of Expander that only deals with cfg attributes. We only need it to |
@@ -49,7 +49,7 @@ pub(crate) struct Expander { | |||
49 | def_map: Arc<DefMap>, | 49 | def_map: Arc<DefMap>, |
50 | current_file_id: HirFileId, | 50 | current_file_id: HirFileId, |
51 | ast_id_map: Arc<AstIdMap>, | 51 | ast_id_map: Arc<AstIdMap>, |
52 | module: ModuleId, | 52 | module: LocalModuleId, |
53 | recursion_limit: usize, | 53 | recursion_limit: usize, |
54 | } | 54 | } |
55 | 55 | ||
@@ -94,7 +94,7 @@ impl Expander { | |||
94 | def_map: crate_def_map, | 94 | def_map: crate_def_map, |
95 | current_file_id, | 95 | current_file_id, |
96 | ast_id_map, | 96 | ast_id_map, |
97 | module, | 97 | module: module.local_id, |
98 | recursion_limit: 0, | 98 | recursion_limit: 0, |
99 | } | 99 | } |
100 | } | 100 | } |
@@ -197,10 +197,7 @@ impl Expander { | |||
197 | } | 197 | } |
198 | 198 | ||
199 | fn resolve_path_as_macro(&self, db: &dyn DefDatabase, path: &ModPath) -> Option<MacroDefId> { | 199 | fn resolve_path_as_macro(&self, db: &dyn DefDatabase, path: &ModPath) -> Option<MacroDefId> { |
200 | self.def_map | 200 | self.def_map.resolve_path(db, self.module, path, BuiltinShadowMode::Other).0.take_macros() |
201 | .resolve_path(db, self.module.local_id, path, BuiltinShadowMode::Other) | ||
202 | .0 | ||
203 | .take_macros() | ||
204 | } | 201 | } |
205 | 202 | ||
206 | fn ast_id<N: AstNode>(&self, item: &N) -> AstId<N> { | 203 | fn ast_id<N: AstNode>(&self, item: &N) -> AstId<N> { |