Skip to content

Commit

Permalink
Paper over the miscompile
Browse files Browse the repository at this point in the history
  • Loading branch information
saethlin committed Jan 11, 2024
1 parent af480fa commit 52e910a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_monomorphize/src/partitioning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ fn merge_codegen_units<'tcx>(
// If we didn't zero-pad the sorted-by-name order would be `XYZ-cgu.0`,
// `XYZ-cgu.1`, `XYZ-cgu.10`, `XYZ-cgu.11`, ..., `XYZ-cgu.2`, etc.
codegen_units.sort_by_key(|cgu| cmp::Reverse(cgu.size_estimate()));
let num_digits = codegen_units.len().ilog10() as usize + 1;
let num_digits = std::hint::black_box(codegen_units.len().ilog10() as usize + 1);
for (index, cgu) in codegen_units.iter_mut().enumerate() {
// Note: `WorkItem::short_description` depends on this name ending
// with `-cgu.` followed by a numeric suffix. Please keep it in
Expand Down

0 comments on commit 52e910a

Please sign in to comment.