From b12e49dd9779f88f97993db67f9d32e1d1eb0284 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 25 Nov 2022 08:57:16 +0100 Subject: [PATCH] replace a borrow_mut by get_mut --- src/stacked_borrows/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stacked_borrows/mod.rs b/src/stacked_borrows/mod.rs index bc52428910aa0..9fdd1562c1976 100644 --- a/src/stacked_borrows/mod.rs +++ b/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();