Skip to content

Commit f3ba6a5

Browse files
committed
correction
1 parent 0f50604 commit f3ba6a5

File tree

1 file changed

+1
-4
lines changed
  • compiler/rustc_codegen_ssa/src/mir

1 file changed

+1
-4
lines changed

compiler/rustc_codegen_ssa/src/mir/block.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -432,10 +432,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
432432
let otherwise = targets.otherwise();
433433
let otherwise_cold = self.cold_blocks[otherwise];
434434
let otherwise_unreachable = self.mir[otherwise].is_empty_unreachable();
435-
let cold_count = targets
436-
.iter()
437-
.filter(|(_, target)| self.cold_blocks[*target] == otherwise_cold)
438-
.count();
435+
let cold_count = targets.iter().filter(|(_, target)| self.cold_blocks[*target]).count();
439436
let none_cold = cold_count == 0;
440437
let all_cold = cold_count == targets.iter().len();
441438
if (none_cold && (!otherwise_cold || otherwise_unreachable))

0 commit comments

Comments
 (0)