aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorFelix S. Klock II <[email protected]>2019-04-29 13:03:51 +0100
committerFelix S. Klock II <[email protected]>2019-04-29 13:03:51 +0100
commitd694b0174af8799ba16b5183e8d3e1c4af574f5d (patch)
treea1349b3ad2a2c782566176e61d87eceeb23e16bc /crates/ra_hir/src
parent6618d1edc3edaad9ebdc216e6d7423ac9ac6a265 (diff)
Sidestep two-phase borrow violation signaled by mutable_borrow_reservation_conflict.
See rust-lang/rust#59159 for further information/discussion.
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/nameres/collector.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_hir/src/nameres/collector.rs b/crates/ra_hir/src/nameres/collector.rs
index b34c9b8e6..4640b3b74 100644
--- a/crates/ra_hir/src/nameres/collector.rs
+++ b/crates/ra_hir/src/nameres/collector.rs
@@ -522,9 +522,10 @@ where
522 if let Some(macro_id) = 522 if let Some(macro_id) =
523 mac.path.as_ident().and_then(|name| self.def_collector.global_macro_scope.get(&name)) 523 mac.path.as_ident().and_then(|name| self.def_collector.global_macro_scope.get(&name))
524 { 524 {
525 let macro_call_id = MacroCallLoc { def: *macro_id, ast_id }.id(self.def_collector.db); 525 let def = *macro_id;
526 let macro_call_id = MacroCallLoc { def, ast_id }.id(self.def_collector.db);
526 527
527 self.def_collector.collect_macro_expansion(self.module_id, macro_call_id, *macro_id); 528 self.def_collector.collect_macro_expansion(self.module_id, macro_call_id, def);
528 return; 529 return;
529 } 530 }
530 531