Auto merge of #2691 - RalfJung:get_mut, r=RalfJung
replace a borrow_mut by get_mut
This commit is contained in:
commit
fe815229c3
1 changed files with 2 additions and 2 deletions
|
@ -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
|
// Note that this asserts that the allocation is mutable -- but since we are creating a
|
||||||
// mutable pointer, that seems reasonable.
|
// mutable pointer, that seems reasonable.
|
||||||
let (alloc_extra, machine) = this.get_alloc_extra_mut(alloc_id)?;
|
let (alloc_extra, machine) = this.get_alloc_extra_mut(alloc_id)?;
|
||||||
let mut stacked_borrows = alloc_extra
|
let stacked_borrows = alloc_extra
|
||||||
.stacked_borrows
|
.stacked_borrows
|
||||||
.as_mut()
|
.as_mut()
|
||||||
.expect("we should have Stacked Borrows data")
|
.expect("we should have Stacked Borrows data")
|
||||||
.borrow_mut();
|
.get_mut();
|
||||||
let item = Item::new(new_tag, perm, protect.is_some());
|
let item = Item::new(new_tag, perm, protect.is_some());
|
||||||
let range = alloc_range(base_offset, size);
|
let range = alloc_range(base_offset, size);
|
||||||
let global = machine.stacked_borrows.as_ref().unwrap().borrow();
|
let global = machine.stacked_borrows.as_ref().unwrap().borrow();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue