Skip to content

Commit

Permalink
Use localdefid index in mir encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
pierwill committed Nov 2, 2021
1 parent 3978a05 commit 644dcd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_metadata/src/rmeta/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ impl 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);

Expand Down

0 comments on commit 644dcd0

Please sign in to comment.