about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-11-25 08:57:16 +0100
committerRalf Jung <post@ralfj.de>2022-11-25 08:57:16 +0100
commit448f0444070b21abc2c054e778aabdf7b16e9d8f (patch)
tree986556cb314d239376782a15d3375492131f6e3f /src
parent8b0b2d136eb2db9ab0248e791e2db0228189dde2 (diff)
downloadrust-448f0444070b21abc2c054e778aabdf7b16e9d8f.tar.gz
rust-448f0444070b21abc2c054e778aabdf7b16e9d8f.zip
replace a borrow_mut by get_mut
Diffstat (limited to 'src')
-rw-r--r--src/tools/miri/src/stacked_borrows/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/miri/src/stacked_borrows/mod.rs b/src/tools/miri/src/stacked_borrows/mod.rs
index bc52428910a..9fdd1562c19 100644
--- a/src/tools/miri/src/stacked_borrows/mod.rs
+++ b/src/tools/miri/src/stacked_borrows/mod.rs
@@ -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();