mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Rollup merge of #91920 - Aaron1011:pred-stable-cmp, r=oli-obk
Use `tcx.def_path_hash` in `ExistentialPredicate.stable_cmp` This avoids a needless query invocation
This commit is contained in:
commit
990cf5bca4
@ -787,7 +787,7 @@ impl<'tcx> ExistentialPredicate<'tcx> {
|
|||||||
tcx.def_path_hash(a.item_def_id).cmp(&tcx.def_path_hash(b.item_def_id))
|
tcx.def_path_hash(a.item_def_id).cmp(&tcx.def_path_hash(b.item_def_id))
|
||||||
}
|
}
|
||||||
(AutoTrait(ref a), AutoTrait(ref b)) => {
|
(AutoTrait(ref a), AutoTrait(ref b)) => {
|
||||||
tcx.trait_def(*a).def_path_hash.cmp(&tcx.trait_def(*b).def_path_hash)
|
tcx.def_path_hash(*a).cmp(&tcx.def_path_hash(*b))
|
||||||
}
|
}
|
||||||
(Trait(_), _) => Ordering::Less,
|
(Trait(_), _) => Ordering::Less,
|
||||||
(Projection(_), Trait(_)) => Ordering::Greater,
|
(Projection(_), Trait(_)) => Ordering::Greater,
|
||||||
|
Loading…
Reference in New Issue
Block a user