From bf14e3196b4f340b5c2a57b902b01e07a7d7c3dc Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 20 Oct 2022 19:06:34 +0200 Subject: [PATCH] interpret: remove an incorrect assertion --- compiler/rustc_const_eval/src/interpret/terminator.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler/rustc_const_eval/src/interpret/terminator.rs b/compiler/rustc_const_eval/src/interpret/terminator.rs index 50a82aa0e72c9..57e40e168fa48 100644 --- a/compiler/rustc_const_eval/src/interpret/terminator.rs +++ b/compiler/rustc_const_eval/src/interpret/terminator.rs @@ -35,7 +35,6 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { assert_eq!(discr.layout.ty, switch_ty); // Branch to the `otherwise` case by default, if no match is found. - assert!(!targets.iter().is_empty()); let mut target_block = targets.otherwise(); for (const_int, target) in targets.iter() {