Skip to content

Commit

Permalink
Auto merge of rust-lang#2691 - RalfJung:get_mut, r=RalfJung
Browse files Browse the repository at this point in the history
replace a borrow_mut by get_mut
  • Loading branch information
bors committed Nov 25, 2022
2 parents b655795 + b12e49d commit 2f92cf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stacked_borrows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -935,11 +935,11 @@ trait EvalContextPrivExt<'mir: 'ecx, 'tcx: 'mir, 'ecx>: crate::MiriInterpCxExt<'
// Note that this asserts that the allocation is mutable -- but since we are creating a
// mutable pointer, that seems reasonable.
let (alloc_extra, machine) = this.get_alloc_extra_mut(alloc_id)?;
let mut stacked_borrows = alloc_extra
let stacked_borrows = alloc_extra
.stacked_borrows
.as_mut()
.expect("we should have Stacked Borrows data")
.borrow_mut();
.get_mut();
let item = Item::new(new_tag, perm, protect.is_some());
let range = alloc_range(base_offset, size);
let global = machine.stacked_borrows.as_ref().unwrap().borrow();
Expand Down

0 comments on commit 2f92cf2

Please sign in to comment.