aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres/collector.rs
diff options
context:
space:
mode:
authorarsdragonfly <[email protected]>2019-09-27 21:17:23 +0100
committerarsdragonfly <[email protected]>2019-09-27 21:17:23 +0100
commit84340db87aed477f61bf46ba5e4a75f3eb672237 (patch)
treeaf7fe4eb8045ccb1b73bcdcd80b3a729062bd308 /crates/ra_hir/src/nameres/collector.rs
parentd1988a17f4ceb90bcdaed79072c4b7f647c86854 (diff)
parent21fa889cf3f70c507e3b9f2f6362e65cbb8ed955 (diff)
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer
Diffstat (limited to 'crates/ra_hir/src/nameres/collector.rs')
-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 }