From d694b0174af8799ba16b5183e8d3e1c4af574f5d Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Mon, 29 Apr 2019 14:03:51 +0200 Subject: Sidestep two-phase borrow violation signaled by mutable_borrow_reservation_conflict. See rust-lang/rust#59159 for further information/discussion. --- crates/ra_hir/src/nameres/collector.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir/src/nameres/collector.rs') 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 if let Some(macro_id) = mac.path.as_ident().and_then(|name| self.def_collector.global_macro_scope.get(&name)) { - let macro_call_id = MacroCallLoc { def: *macro_id, ast_id }.id(self.def_collector.db); + let def = *macro_id; + let macro_call_id = MacroCallLoc { def, ast_id }.id(self.def_collector.db); - self.def_collector.collect_macro_expansion(self.module_id, macro_call_id, *macro_id); + self.def_collector.collect_macro_expansion(self.module_id, macro_call_id, def); return; } -- cgit v1.2.3