aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-04-30 15:04:04 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-04-30 15:04:04 +0100
commit43524a39cd6ac26dc6489f6481220179149c5f08 (patch)
treea1349b3ad2a2c782566176e61d87eceeb23e16bc /crates
parent6618d1edc3edaad9ebdc216e6d7423ac9ac6a265 (diff)
parentd694b0174af8799ba16b5183e8d3e1c4af574f5d (diff)
Merge #1217
1217: Sidestep two-phase borrow violation r=matklad a=pnkfelix Sidestep two-phase borrow violation signaled by mutable_borrow_reservation_conflict. See rust-lang/rust#59159 for further information/discussion. Co-authored-by: Felix S. Klock II <[email protected]>
Diffstat (limited to 'crates')
-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