Remove unnecessary RegionKind::
quals.
The variant names are exported, so we can use them directly (possibly with a `ty::` qualifier). Lots of places already do this, this commit just increases consistency.
This commit is contained in:
parent
7024dc523a
commit
7eb15509ce
10 changed files with 56 additions and 71 deletions
|
@ -440,13 +440,9 @@ impl<'tcx> AutoTraitFinder<'tcx> {
|
|||
match (*new_region, *old_region) {
|
||||
// If both predicates have an `ReLateBound` (a HRTB) in the
|
||||
// same spot, we do nothing.
|
||||
(
|
||||
ty::RegionKind::ReLateBound(_, _),
|
||||
ty::RegionKind::ReLateBound(_, _),
|
||||
) => {}
|
||||
(ty::ReLateBound(_, _), ty::ReLateBound(_, _)) => {}
|
||||
|
||||
(ty::RegionKind::ReLateBound(_, _), _)
|
||||
| (_, ty::RegionKind::ReVar(_)) => {
|
||||
(ty::ReLateBound(_, _), _) | (_, ty::ReVar(_)) => {
|
||||
// One of these is true:
|
||||
// The new predicate has a HRTB in a spot where the old
|
||||
// predicate does not (if they both had a HRTB, the previous
|
||||
|
@ -472,8 +468,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
|
|||
// `user_computed_preds`.
|
||||
return false;
|
||||
}
|
||||
(_, ty::RegionKind::ReLateBound(_, _))
|
||||
| (ty::RegionKind::ReVar(_), _) => {
|
||||
(_, ty::ReLateBound(_, _)) | (ty::ReVar(_), _) => {
|
||||
// This is the opposite situation as the previous arm.
|
||||
// One of these is true:
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue