From 8952c8aa42209919c2980e99f11694e36f2b6845 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 16 Nov 2019 14:10:07 +0100 Subject: [PATCH] ICE on invalid MIR --- src/librustc_mir/interpret/terminator.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/librustc_mir/interpret/terminator.rs b/src/librustc_mir/interpret/terminator.rs index 0134c77808b..50c4a249c63 100644 --- a/src/librustc_mir/interpret/terminator.rs +++ b/src/librustc_mir/interpret/terminator.rs @@ -264,10 +264,7 @@ fn eval_fn_call( match instance.def { ty::InstanceDef::Intrinsic(..) => { - if caller_abi != Abi::RustIntrinsic && caller_abi != Abi::PlatformIntrinsic { - throw_ub_format!("Rust intrinsic called with an ABI other than \ - `RustIntrinsic` and `PlatformIntrinsic`."); - } + assert!(caller_abi == Abi::RustIntrinsic || caller_abi == Abi::PlatformIntrinsic); let old_stack = self.cur_frame(); let old_bb = self.frame().block; -- 2.44.0