From 45d5a37787accac8bd4276ea47872a561069109c Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 11 Mar 2020 20:05:44 +0100 Subject: [PATCH] rustup+fix --- rust-version | 2 +- src/machine.rs | 3 +-- src/shims/panic.rs | 10 +++------- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/rust-version b/rust-version index fb138448f9f4..66d096c0a02b 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -303d8aff6092709edd4dbd35b1c88e9aa40bf6d8 +c20d7eecbc0928b57da8fe30b2ef8528e2bdd5be diff --git a/src/machine.rs b/src/machine.rs index f69606e48f52..bd5884786c0e 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -265,11 +265,10 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'tcx> { #[inline(always)] fn assert_panic( ecx: &mut InterpCx<'mir, 'tcx, Self>, - span: Span, msg: &mir::AssertMessage<'tcx>, unwind: Option, ) -> InterpResult<'tcx> { - ecx.assert_panic(span, msg, unwind) + ecx.assert_panic(msg, unwind) } #[inline(always)] diff --git a/src/shims/panic.rs b/src/shims/panic.rs index 2968bd9b58d8..d6f563deb0f9 100644 --- a/src/shims/panic.rs +++ b/src/shims/panic.rs @@ -14,7 +14,6 @@ use rustc::mir; use rustc::ty::{self, layout::LayoutOf}; use rustc_target::spec::PanicStrategy; -use rustc_span::source_map::Span; use crate::*; @@ -176,7 +175,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx fn assert_panic( &mut self, - span: Span, msg: &mir::AssertMessage<'tcx>, unwind: Option, ) -> InterpResult<'tcx> { @@ -187,11 +185,9 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx BoundsCheck { ref index, ref len } => { // Forward to `panic_bounds_check` lang item. - // First arg: Caller location. - let location = this.alloc_caller_location_for_span(span); - // Second arg: index. + // First arg: index. let index = this.read_scalar(this.eval_operand(index, None)?)?; - // Third arg: len. + // Second arg: len. let len = this.read_scalar(this.eval_operand(len, None)?)?; // Call the lang item. @@ -199,7 +195,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx let panic_bounds_check = ty::Instance::mono(this.tcx.tcx, panic_bounds_check); this.call_function( panic_bounds_check, - &[location.ptr.into(), index.into(), len.into()], + &[index.into(), len.into()], None, StackPopCleanup::Goto { ret: None, unwind }, )?;