fmt
This commit is contained in:
parent
e09f743d38
commit
ec91a2361b
@ -975,7 +975,10 @@ fn panic_nounwind(ecx: &mut InterpCx<'mir, 'tcx, Self>, msg: &str) -> InterpResu
|
||||
ecx.start_panic_nounwind(msg)
|
||||
}
|
||||
|
||||
fn unwind_terminate(ecx: &mut InterpCx<'mir, 'tcx, Self>, reason: mir::UnwindTerminateReason) -> InterpResult<'tcx> {
|
||||
fn unwind_terminate(
|
||||
ecx: &mut InterpCx<'mir, 'tcx, Self>,
|
||||
reason: mir::UnwindTerminateReason,
|
||||
) -> InterpResult<'tcx> {
|
||||
// Call the lang item.
|
||||
let panic = ecx.tcx.lang_items().get(reason.lang_item()).unwrap();
|
||||
let panic = ty::Instance::mono(ecx.tcx.tcx, panic);
|
||||
@ -1410,17 +1413,14 @@ fn after_local_allocated(
|
||||
ecx: &mut InterpCx<'mir, 'tcx, Self>,
|
||||
frame: usize,
|
||||
local: mir::Local,
|
||||
mplace: &MPlaceTy<'tcx, Provenance>
|
||||
mplace: &MPlaceTy<'tcx, Provenance>,
|
||||
) -> InterpResult<'tcx> {
|
||||
let Some(Provenance::Concrete { alloc_id, .. }) = mplace.ptr.provenance else {
|
||||
panic!("after_local_allocated should only be called on fresh allocations");
|
||||
};
|
||||
let local_decl = &ecx.active_thread_stack()[frame].body.local_decls[local];
|
||||
let span = local_decl.source_info.span;
|
||||
ecx.machine
|
||||
.allocation_spans
|
||||
.borrow_mut()
|
||||
.insert(alloc_id, (span, None));
|
||||
ecx.machine.allocation_spans.borrow_mut().insert(alloc_id, (span, None));
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user