diff options
Diffstat (limited to 'crates/ra_hir_def')
-rw-r--r-- | crates/ra_hir_def/src/nameres/collector.rs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs index 5f18e9de3..30664278e 100644 --- a/crates/ra_hir_def/src/nameres/collector.rs +++ b/crates/ra_hir_def/src/nameres/collector.rs | |||
@@ -3,7 +3,7 @@ | |||
3 | use hir_expand::{ | 3 | use hir_expand::{ |
4 | builtin_macro::find_builtin_macro, | 4 | builtin_macro::find_builtin_macro, |
5 | name::{self, AsName, Name}, | 5 | name::{self, AsName, Name}, |
6 | DeclarativeMacro, HirFileId, MacroCallId, MacroCallLoc, MacroDefId, MacroFileKind, | 6 | HirFileId, MacroCallId, MacroCallLoc, MacroDefId, MacroDefKind, MacroFileKind, |
7 | }; | 7 | }; |
8 | use ra_cfg::CfgOptions; | 8 | use ra_cfg::CfgOptions; |
9 | use ra_db::{CrateId, FileId}; | 9 | use ra_db::{CrateId, FileId}; |
@@ -708,13 +708,12 @@ where | |||
708 | // Case 1: macro rules, define a macro in crate-global mutable scope | 708 | // Case 1: macro rules, define a macro in crate-global mutable scope |
709 | if is_macro_rules(&mac.path) { | 709 | if is_macro_rules(&mac.path) { |
710 | if let Some(name) = &mac.name { | 710 | if let Some(name) = &mac.name { |
711 | let macro_id = DeclarativeMacro { ast_id, krate: self.def_collector.def_map.krate }; | 711 | let macro_id = MacroDefId { |
712 | self.def_collector.define_macro( | 712 | ast_id, |
713 | self.module_id, | 713 | krate: self.def_collector.def_map.krate, |
714 | name.clone(), | 714 | kind: MacroDefKind::Declarative, |
715 | MacroDefId::DeclarativeMacro(macro_id), | 715 | }; |
716 | mac.export, | 716 | self.def_collector.define_macro(self.module_id, name.clone(), macro_id, mac.export); |
717 | ); | ||
718 | } | 717 | } |
719 | return; | 718 | return; |
720 | } | 719 | } |