Skip to content

Commit 623b626

Browse files
committed
Paper over the miscompile
1 parent f6263d1 commit 623b626

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_monomorphize/src/partitioning.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ fn merge_codegen_units<'tcx>(
495495
// If we didn't zero-pad the sorted-by-name order would be `XYZ-cgu.0`,
496496
// `XYZ-cgu.1`, `XYZ-cgu.10`, `XYZ-cgu.11`, ..., `XYZ-cgu.2`, etc.
497497
codegen_units.sort_by_key(|cgu| cmp::Reverse(cgu.size_estimate()));
498-
let num_digits = codegen_units.len().ilog10() as usize + 1;
498+
let num_digits = std::hint::black_box(codegen_units.len().ilog10() as usize + 1);
499499
for (index, cgu) in codegen_units.iter_mut().enumerate() {
500500
// Note: `WorkItem::short_description` depends on this name ending
501501
// with `-cgu.` followed by a numeric suffix. Please keep it in

0 commit comments

Comments
 (0)