diff --git a/compiler/rustc_monomorphize/src/partitioning.rs b/compiler/rustc_monomorphize/src/partitioning.rs index 7aa3a60316a9..1d76eb82578c 100644 --- a/compiler/rustc_monomorphize/src/partitioning.rs +++ b/compiler/rustc_monomorphize/src/partitioning.rs @@ -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