]> git.lizzy.rs Git - rust.git/blobdiff - src/shims/panic.rs
Auto merge of #2189 - RalfJung:clippy, r=RalfJung
[rust.git] / src / shims / panic.rs
index f92e39048bc860d0adc60a8f87a82f644f02b396..ed6e72591dd002e331b3ab45193573854486dfc4 100644 (file)
@@ -96,7 +96,7 @@ fn handle_try(
             f_instance,
             Abi::Rust,
             &[data.into()],
-            Some(&ret_place),
+            &ret_place,
             // Directly return to caller.
             StackPopCleanup::Goto { ret: Some(ret), unwind: StackPopUnwind::Skip },
         )?;
@@ -153,7 +153,7 @@ fn handle_stack_pop(
                 f_instance,
                 Abi::Rust,
                 &[catch_unwind.data.into(), payload.into()],
-                Some(&ret_place),
+                &ret_place,
                 // Directly return to caller of `try`.
                 StackPopCleanup::Goto { ret: Some(catch_unwind.ret), unwind: StackPopUnwind::Skip },
             )?;
@@ -179,7 +179,7 @@ fn start_panic(&mut self, msg: &str, unwind: StackPopUnwind) -> InterpResult<'tc
             panic,
             Abi::Rust,
             &[msg.to_ref(this)],
-            None,
+            &MPlaceTy::dangling(this.machine.layouts.unit).into(),
             StackPopCleanup::Goto { ret: None, unwind },
         )
     }
@@ -208,7 +208,7 @@ fn assert_panic(
                     panic_bounds_check,
                     Abi::Rust,
                     &[index.into(), len.into()],
-                    None,
+                    &MPlaceTy::dangling(this.machine.layouts.unit).into(),
                     StackPopCleanup::Goto {
                         ret: None,
                         unwind: match unwind {