Skip to content

Commit 4a349d2

Browse files
committed
remove unnecessary frame parameter from after_local_allocated
1 parent 40c12d1 commit 4a349d2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/machine.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,14 +1473,13 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
14731473

14741474
fn after_local_allocated(
14751475
ecx: &mut InterpCx<'mir, 'tcx, Self>,
1476-
frame: usize,
14771476
local: mir::Local,
14781477
mplace: &MPlaceTy<'tcx, Provenance>,
14791478
) -> InterpResult<'tcx> {
14801479
let Some(Provenance::Concrete { alloc_id, .. }) = mplace.ptr().provenance else {
14811480
panic!("after_local_allocated should only be called on fresh allocations");
14821481
};
1483-
let local_decl = &ecx.active_thread_stack()[frame].body.local_decls[local];
1482+
let local_decl = &ecx.frame().body.local_decls[local];
14841483
let span = local_decl.source_info.span;
14851484
ecx.machine.allocation_spans.borrow_mut().insert(alloc_id, (span, None));
14861485
Ok(())

0 commit comments

Comments
 (0)