Skip to content

Commit 33d5362

Browse files
committed
Use sort_unstable in NLL
1 parent 6a3db03 commit 33d5362

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/librustc_mir/borrow_check/nll/region_infer/dump_mir.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
7777
}
7878

7979
let mut constraints: Vec<_> = self.constraints.iter().collect();
80-
constraints.sort();
80+
constraints.sort_unstable();
8181
for constraint in &constraints {
8282
let OutlivesConstraint {
8383
sup,

src/librustc_mir/borrow_check/nll/region_infer/error_reporting/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
227227
debug!("report_error: categorized_path={:?}", categorized_path);
228228

229229
// Find what appears to be the most interesting path to report to the user.
230-
categorized_path.sort_by(|p0, p1| p0.0.cmp(&p1.0));
230+
categorized_path.sort_unstable_by(|p0, p1| p0.0.cmp(&p1.0));
231231
debug!("report_error: sorted_path={:?}", categorized_path);
232232

233233
// Get a span

src/librustc_mir/borrow_check/nll/region_infer/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
418418

419419
debug!("propagate_constraints: constraints={:#?}", {
420420
let mut constraints: Vec<_> = self.constraints.iter().collect();
421-
constraints.sort();
421+
constraints.sort_unstable();
422422
constraints
423423
});
424424

0 commit comments

Comments
 (0)