Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 61bdbd7

Browse files
committedMar 15, 2024·
Paper over the miscompile
1 parent 23954e5 commit 61bdbd7

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

0 commit comments

Comments
 (0)
Please sign in to comment.