aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r--crates/ra_hir/src/nameres/collector.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_hir/src/nameres/collector.rs b/crates/ra_hir/src/nameres/collector.rs
index ef7dc6ebe..65929c522 100644
--- a/crates/ra_hir/src/nameres/collector.rs
+++ b/crates/ra_hir/src/nameres/collector.rs
@@ -662,7 +662,10 @@ where
662 // Case 1: macro rules, define a macro in crate-global mutable scope 662 // Case 1: macro rules, define a macro in crate-global mutable scope
663 if is_macro_rules(&mac.path) { 663 if is_macro_rules(&mac.path) {
664 if let Some(name) = &mac.name { 664 if let Some(name) = &mac.name {
665 let macro_id = MacroDefId(mac.ast_id.with_file_id(self.file_id)); 665 let macro_id = MacroDefId {
666 ast_id: mac.ast_id.with_file_id(self.file_id),
667 krate: self.def_collector.def_map.krate,
668 };
666 let macro_ = MacroDef { id: macro_id }; 669 let macro_ = MacroDef { id: macro_id };
667 self.def_collector.define_macro(self.module_id, name.clone(), macro_, mac.export); 670 self.def_collector.define_macro(self.module_id, name.clone(), macro_, mac.export);
668 } 671 }