about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-10-20 19:06:34 +0200
committerRalf Jung <post@ralfj.de>2022-10-20 19:06:34 +0200
commitbf14e3196b4f340b5c2a57b902b01e07a7d7c3dc (patch)
tree38b094860e580ab1d410300724db8010c5bbb3dd
parent538f118da1409759ba198acc0ff62070bc6d2dce (diff)
downloadrust-bf14e3196b4f340b5c2a57b902b01e07a7d7c3dc.tar.gz
rust-bf14e3196b4f340b5c2a57b902b01e07a7d7c3dc.zip
interpret: remove an incorrect assertion
-rw-r--r--compiler/rustc_const_eval/src/interpret/terminator.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/terminator.rs b/compiler/rustc_const_eval/src/interpret/terminator.rs
index 50a82aa0e72..57e40e168fa 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() {