]> git.lizzy.rs Git - rust.git/commitdiff
rustup+fix
authorRalf Jung <post@ralfj.de>
Wed, 11 Mar 2020 19:05:44 +0000 (20:05 +0100)
committerRalf Jung <post@ralfj.de>
Wed, 11 Mar 2020 19:39:18 +0000 (20:39 +0100)
rust-version
src/machine.rs
src/shims/panic.rs

index fb138448f9f4bd85ea6b3300e16d51dfec0e6dff..66d096c0a02b066dc56d2325489656353167ccfe 100644 (file)
@@ -1 +1 @@
-303d8aff6092709edd4dbd35b1c88e9aa40bf6d8
+c20d7eecbc0928b57da8fe30b2ef8528e2bdd5be
index f69606e48f52c7a76054dcb4f63876eb51f1acae..bd5884786c0e0f90373e1129e6707f6df256d43a 100644 (file)
@@ -265,11 +265,10 @@ fn call_intrinsic(
     #[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)]
index 2968bd9b58d8c6a0c1785881a3e471c6783199f2..d6f563deb0f930eba46a43efdcafbeadeead5900 100644 (file)
@@ -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 @@ fn start_panic(
 
     fn assert_panic(
         &mut self,
-        span: Span,
         msg: &mir::AssertMessage<'tcx>,
         unwind: Option<mir::BasicBlock>,
     ) -> InterpResult<'tcx> {
@@ -187,11 +185,9 @@ fn assert_panic(
             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 @@ fn assert_panic(
                 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 },
                 )?;