Skip to content

Commit 644dcd0

Browse files
committed
Use localdefid index in mir encoding
1 parent 3978a05 commit 644dcd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_metadata/src/rmeta/encoder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ impl EncodeContext<'a, 'tcx> {
13001300
})
13011301
.collect::<Vec<_>>();
13021302
// Sort everything to ensure a stable order for diagnotics.
1303-
keys_and_jobs.sort_by_key(|&(def_id, _, _)| def_id);
1303+
keys_and_jobs.sort_by_key(|&(def_id, _, _)| def_id.index());
13041304
for (def_id, encode_const, encode_opt) in keys_and_jobs.into_iter() {
13051305
debug_assert!(encode_const || encode_opt);
13061306

0 commit comments

Comments
 (0)