Skip to content

Commit c2c00f5

Browse files
committed
fixup! Update compiler to use new is_sorted_by
1 parent 3e0f472 commit c2c00f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_monomorphize/src/partitioning.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ where
182182
}
183183

184184
// Ensure CGUs are sorted by name, so that we get deterministic results.
185-
if !codegen_units.is_sorted_by(|a, b| a.name().as_str() < b.name().as_str()) {
185+
if !codegen_units.is_sorted_by(|a, b| a.name().as_str() <= b.name().as_str()) {
186186
let mut names = String::new();
187187
for cgu in codegen_units.iter() {
188188
names += &format!("- {}\n", cgu.name());
@@ -311,7 +311,7 @@ fn merge_codegen_units<'tcx>(
311311
assert!(cx.tcx.sess.codegen_units().as_usize() >= 1);
312312

313313
// A sorted order here ensures merging is deterministic.
314-
assert!(codegen_units.is_sorted_by(|a, b| a.name().as_str() < b.name().as_str()));
314+
assert!(codegen_units.is_sorted_by(|a, b| a.name().as_str() <= b.name().as_str()));
315315

316316
// This map keeps track of what got merged into what.
317317
let mut cgu_contents: FxHashMap<Symbol, Vec<Symbol>> =

0 commit comments

Comments
 (0)