Skip to content

Commit fe81522

Browse files
committed
Auto merge of rust-lang#2691 - RalfJung:get_mut, r=RalfJung
replace a borrow_mut by get_mut
2 parents 8b0b2d1 + 448f044 commit fe81522

File tree

1 file changed

+2
-2
lines changed
  • src/tools/miri/src/stacked_borrows

1 file changed

+2
-2
lines changed

src/tools/miri/src/stacked_borrows/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -935,11 +935,11 @@ trait EvalContextPrivExt<'mir: 'ecx, 'tcx: 'mir, 'ecx>: crate::MiriInterpCxExt<'
935935
// Note that this asserts that the allocation is mutable -- but since we are creating a
936936
// mutable pointer, that seems reasonable.
937937
let (alloc_extra, machine) = this.get_alloc_extra_mut(alloc_id)?;
938-
let mut stacked_borrows = alloc_extra
938+
let stacked_borrows = alloc_extra
939939
.stacked_borrows
940940
.as_mut()
941941
.expect("we should have Stacked Borrows data")
942-
.borrow_mut();
942+
.get_mut();
943943
let item = Item::new(new_tag, perm, protect.is_some());
944944
let range = alloc_range(base_offset, size);
945945
let global = machine.stacked_borrows.as_ref().unwrap().borrow();

0 commit comments

Comments
 (0)