]> git.lizzy.rs Git - rust.git/commitdiff
Fix incorrect unwrap of dest
authorAaron Hill <aa1ronham@gmail.com>
Thu, 26 Sep 2019 17:11:56 +0000 (13:11 -0400)
committerAaron Hill <aa1ronham@gmail.com>
Mon, 11 Nov 2019 20:14:32 +0000 (15:14 -0500)
src/librustc_mir/interpret/terminator.rs

index 983497dc4297ea5ccd149e365f02c2e430a2da55..c8fc0409f0704950a1f504218e6ba3cad59dc62b 100644 (file)
@@ -269,12 +269,6 @@ fn eval_fn_call(
                     throw_unsup!(FunctionAbiMismatch(caller_abi, Abi::RustIntrinsic))
                 }
 
-                // The intrinsic itself cannot diverge, so if we got here without a return
-                // place... (can happen e.g., for transmute returning `!`)
-                let dest = match dest {
-                    Some(dest) => dest,
-                    None => throw_ub!(Unreachable)
-                };
                 M::call_intrinsic(self, span, instance, args, dest)?;
                 // No stack frame gets pushed, the main loop will just act as if the
                 // call completed.