Skip to content

Commit b8c0497

Browse files
committed
interpret: support projecting into Place::Local without force_allocation
1 parent c6a3b13 commit b8c0497

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/borrow_tracker/tree_borrows/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
578578
/// I.e. input is what you get from the visitor upon encountering an `adt` that is `Unique`,
579579
/// and output can be used by `retag_ptr_inplace`.
580580
fn inner_ptr_of_unique<'tcx>(
581-
ecx: &mut MiriInterpCx<'_, 'tcx>,
581+
ecx: &MiriInterpCx<'_, 'tcx>,
582582
place: &PlaceTy<'tcx, Provenance>,
583583
) -> InterpResult<'tcx, PlaceTy<'tcx, Provenance>> {
584584
// Follows the same layout as `interpret/visitor.rs:walk_value` for `Box` in

src/helpers.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
301301
}
302302

303303
/// Get the `Place` for a local
304-
fn local_place(&mut self, local: mir::Local) -> InterpResult<'tcx, PlaceTy<'tcx, Provenance>> {
305-
let this = self.eval_context_mut();
304+
fn local_place(&self, local: mir::Local) -> InterpResult<'tcx, PlaceTy<'tcx, Provenance>> {
305+
let this = self.eval_context_ref();
306306
let place = mir::Place { local, projection: List::empty() };
307307
this.eval_place(place)
308308
}

0 commit comments

Comments
 (0)