From 0a3f460d6966da30bc0128ab89959e17cf64fb04 Mon Sep 17 00:00:00 2001 From: Adam Perry Date: Wed, 1 Jan 2020 14:57:10 -0800 Subject: [PATCH] Update panic machinery to match #[track_caller] changes. This gets miri's tests passing again with https://github.com/rust-lang/rust/pull/67137. --- src/machine.rs | 1 + src/shims/panic.rs | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/machine.rs b/src/machine.rs index 37253a260de7..502120d316b7 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -182,6 +182,7 @@ fn enforce_validity(ecx: &InterpCx<'mir, 'tcx, Self>) -> bool { #[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)>, diff --git a/src/shims/panic.rs b/src/shims/panic.rs index f242f41f6f96..8f082f45c915 100644 --- a/src/shims/panic.rs +++ b/src/shims/panic.rs @@ -187,15 +187,12 @@ fn assert_panic( 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 }, )?;