diff options
author | Aleksey Kladov <[email protected]> | 2019-05-13 23:12:07 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-05-14 07:03:43 +0100 |
commit | 101b3abfd70cc988b24f30a610d46a3986df54d3 (patch) | |
tree | 61a44635319fae9a4670b4a660c72b462aec682f /crates/ra_hir/src/nameres/collector.rs | |
parent | ee0ab7c00b4b8c5375c14b44e3d7288ebf0d732d (diff) |
store macro kind in HirFileId
Diffstat (limited to 'crates/ra_hir/src/nameres/collector.rs')
-rw-r--r-- | crates/ra_hir/src/nameres/collector.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/nameres/collector.rs b/crates/ra_hir/src/nameres/collector.rs index 4640b3b74..c615d80c3 100644 --- a/crates/ra_hir/src/nameres/collector.rs +++ b/crates/ra_hir/src/nameres/collector.rs | |||
@@ -15,7 +15,7 @@ use crate::{ | |||
15 | diagnostics::DefDiagnostic, | 15 | diagnostics::DefDiagnostic, |
16 | raw, | 16 | raw, |
17 | }, | 17 | }, |
18 | ids::{AstItemDef, LocationCtx, MacroCallLoc, MacroCallId, MacroDefId}, | 18 | ids::{AstItemDef, LocationCtx, MacroCallLoc, MacroCallId, MacroDefId, MacroFileKind}, |
19 | AstId, | 19 | AstId, |
20 | }; | 20 | }; |
21 | 21 | ||
@@ -371,7 +371,7 @@ where | |||
371 | self.macro_stack_monitor.increase(macro_def_id); | 371 | self.macro_stack_monitor.increase(macro_def_id); |
372 | 372 | ||
373 | if !self.macro_stack_monitor.is_poison(macro_def_id) { | 373 | if !self.macro_stack_monitor.is_poison(macro_def_id) { |
374 | let file_id: HirFileId = macro_call_id.into(); | 374 | let file_id: HirFileId = macro_call_id.as_file(MacroFileKind::Items); |
375 | let raw_items = self.db.raw_items(file_id); | 375 | let raw_items = self.db.raw_items(file_id); |
376 | ModCollector { def_collector: &mut *self, file_id, module_id, raw_items: &raw_items } | 376 | ModCollector { def_collector: &mut *self, file_id, module_id, raw_items: &raw_items } |
377 | .collect(raw_items.items()); | 377 | .collect(raw_items.items()); |