#[inline(always)]
fn assert_panic(
ecx: &mut InterpCx<'mir, 'tcx, Self>,
- span: Span,
msg: &mir::AssertMessage<'tcx>,
unwind: Option<mir::BasicBlock>,
) -> InterpResult<'tcx> {
- ecx.assert_panic(span, msg, unwind)
+ ecx.assert_panic(msg, unwind)
}
#[inline(always)]
use rustc::mir;
use rustc::ty::{self, layout::LayoutOf};
use rustc_target::spec::PanicStrategy;
-use rustc_span::source_map::Span;
use crate::*;
fn assert_panic(
&mut self,
- span: Span,
msg: &mir::AssertMessage<'tcx>,
unwind: Option<mir::BasicBlock>,
) -> InterpResult<'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.
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 },
)?;