Skip to content

Commit

Permalink
Sort query output.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot authored and Mark-Simulacrum committed Jul 15, 2022
1 parent f1aa652 commit 94ed9c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler/rustc_resolve/src/late/lifetimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,11 @@ fn convert_named_region_map(tcx: TyCtxt<'_>, named_region_map: NamedRegionMap) -
let def_id = tcx.hir().local_def_id(hir_id);
map.insert(def_id);
}
for (_, late_bound) in &mut rl.late_bound {
late_bound.sort_by(|&a, &b| {
tcx.def_path_hash(a.to_def_id()).cmp(&tcx.def_path_hash(b.to_def_id()))
});
}
for (hir_id, v) in named_region_map.late_bound_vars {
let map = rl.late_bound_vars.entry(hir_id.owner).or_default();
map.insert(hir_id.local_id, v);
Expand Down

0 comments on commit 94ed9c9

Please sign in to comment.