Skip to content

Commit 8952c8a

Browse files
committed
ICE on invalid MIR
1 parent 09180d7 commit 8952c8a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/librustc_mir/interpret/terminator.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
264264

265265
match instance.def {
266266
ty::InstanceDef::Intrinsic(..) => {
267-
if caller_abi != Abi::RustIntrinsic && caller_abi != Abi::PlatformIntrinsic {
268-
throw_ub_format!("Rust intrinsic called with an ABI other than \
269-
`RustIntrinsic` and `PlatformIntrinsic`.");
270-
}
267+
assert!(caller_abi == Abi::RustIntrinsic || caller_abi == Abi::PlatformIntrinsic);
271268

272269
let old_stack = self.cur_frame();
273270
let old_bb = self.frame().block;

0 commit comments

Comments
 (0)