Update panic machinery to match #[track_caller] changes.
This gets miri's tests passing again with https://github.com/rust-lang/rust/pull/67137.
This commit is contained in:
parent
f3c267d07c
commit
0a3f460d69
2 changed files with 2 additions and 4 deletions
|
|
@ -182,6 +182,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'tcx> {
|
|||
#[inline(always)]
|
||||
fn find_mir_or_eval_fn(
|
||||
ecx: &mut InterpCx<'mir, 'tcx, Self>,
|
||||
_span: Span,
|
||||
instance: ty::Instance<'tcx>,
|
||||
args: &[OpTy<'tcx, Tag>],
|
||||
ret: Option<(PlaceTy<'tcx, Tag>, mir::BasicBlock)>,
|
||||
|
|
|
|||
|
|
@ -187,15 +187,12 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
|
|||
let msg = msg.description();
|
||||
let msg = this.allocate_str(msg, MiriMemoryKind::Env.into());
|
||||
|
||||
// Second arg: Caller location.
|
||||
let location = this.alloc_caller_location_for_span(span);
|
||||
|
||||
// Call the lang item.
|
||||
let panic = this.tcx.lang_items().panic_fn().unwrap();
|
||||
let panic = ty::Instance::mono(this.tcx.tcx, panic);
|
||||
this.call_function(
|
||||
panic,
|
||||
&[msg.to_ref(), location.ptr.into()],
|
||||
&[msg.to_ref()],
|
||||
None,
|
||||
StackPopCleanup::Goto { ret: None, unwind },
|
||||
)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue