mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-31 00:53:48 +00:00
Use tcx.def_path_hash
in ExistentialPredicate.stable_cmp
This avoids a needless query invocation
This commit is contained in:
parent
404c8471ab
commit
4d1d66b812
@ -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))
|
||||
}
|
||||
(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,
|
||||
(Projection(_), Trait(_)) => Ordering::Greater,
|
||||
|
Loading…
Reference in New Issue
Block a user