We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Order
Option
Result
1 parent 1655912 commit cae926bCopy full SHA for cae926b
1 file changed
compiler/rustc_mir_transform/src/unreachable_enum_branching.rs
@@ -179,10 +179,7 @@ impl<'tcx> crate::MirPass<'tcx> for UnreachableEnumBranching {
179
// ```
180
let otherwise_is_last_variant = !otherwise_is_empty_unreachable
181
&& allowed_variants.len() == 1
182
- // Despite the LLVM issue, we hope that small enum can still be transformed.
183
- // This is valuable for both `a <= b` and `if let Some/Ok(v)`.
184
- && (targets.all_targets().len() <= 3
185
- || check_successors(&body.basic_blocks, targets.otherwise()));
+ && check_successors(&body.basic_blocks, targets.otherwise());
186
let replace_otherwise_to_unreachable = otherwise_is_last_variant
187
|| (!otherwise_is_empty_unreachable && allowed_variants.is_empty());
188
0 commit comments