1
Fork 0

Remove PartialOrd and Ord from LocalDefId

Implement `Ord`, `PartialOrd` for SpanData
This commit is contained in:
pierwill 2021-10-30 10:11:50 -05:00
parent e100ec5bc7
commit 8df9248591
12 changed files with 72 additions and 24 deletions

View file

@ -1306,7 +1306,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
})
.collect::<Vec<_>>();
// Sort everything to ensure a stable order for diagnotics.
keys_and_jobs.sort_by_key(|&(def_id, _, _)| def_id);
keys_and_jobs.sort_by_key(|&(def_id, _, _)| def_id.index());
for (def_id, encode_const, encode_opt) in keys_and_jobs.into_iter() {
debug_assert!(encode_const || encode_opt);