Addition of parentheses to clarify precedence

This commit is contained in:
DianQK 2024-03-08 21:55:22 +08:00
parent df33e02f40
commit a10d157f98
No known key found for this signature in database
GPG Key ID: 46BDB1AC96C48912

View File

@ -177,7 +177,7 @@ impl<'tcx> MirPass<'tcx> for UnreachableEnumBranching {
&& allowed_variants.len() == 1
&& check_successors(&body.basic_blocks, targets.otherwise());
let replace_otherwise_to_unreachable = otherwise_is_last_variant
|| !otherwise_is_empty_unreachable && allowed_variants.is_empty();
|| (!otherwise_is_empty_unreachable && allowed_variants.is_empty());
if unreachable_targets.is_empty() && !replace_otherwise_to_unreachable {
continue;