Skip to content

Commit

Permalink
Merge #1217
Browse files Browse the repository at this point in the history
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 <pnkfelix@pnkfx.org>
  • Loading branch information
bors[bot] and pnkfelix committed Apr 30, 2019
2 parents 6618d1e + d694b01 commit 43524a3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/ra_hir/src/nameres/collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 43524a3

Please sign in to comment.