]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_typeck/outlives/explicit.rs
introduce PredicateAtom
[rust.git] / src / librustc_typeck / outlives / explicit.rs
index 5740cc224cc572f7615f73845839d82c9cf396ab..135960a4c111414dc1f0d2e187e9890e83d16089 100644 (file)
@@ -29,9 +29,8 @@ pub fn explicit_predicates_of(
 
             // process predicates and convert to `RequiredPredicates` entry, see below
             for &(predicate, span) in predicates.predicates {
-                match predicate.kind() {
-                    ty::PredicateKind::TypeOutlives(predicate) => {
-                        let OutlivesPredicate(ref ty, ref reg) = predicate.skip_binder();
+                match predicate.skip_binders() {
+                    ty::PredicateAtom::TypeOutlives(OutlivesPredicate(ref ty, ref reg)) => {
                         insert_outlives_predicate(
                             tcx,
                             (*ty).into(),
@@ -41,8 +40,7 @@ pub fn explicit_predicates_of(
                         )
                     }
 
-                    ty::PredicateKind::RegionOutlives(predicate) => {
-                        let OutlivesPredicate(ref reg1, ref reg2) = predicate.skip_binder();
+                    ty::PredicateAtom::RegionOutlives(OutlivesPredicate(ref reg1, ref reg2)) => {
                         insert_outlives_predicate(
                             tcx,
                             (*reg1).into(),
@@ -52,14 +50,14 @@ pub fn explicit_predicates_of(
                         )
                     }
 
-                    ty::PredicateKind::Trait(..)
-                    | ty::PredicateKind::Projection(..)
-                    | ty::PredicateKind::WellFormed(..)
-                    | ty::PredicateKind::ObjectSafe(..)
-                    | ty::PredicateKind::ClosureKind(..)
-                    | ty::PredicateKind::Subtype(..)
-                    | ty::PredicateKind::ConstEvaluatable(..)
-                    | ty::PredicateKind::ConstEquate(..) => (),
+                    ty::PredicateAtom::Trait(..)
+                    | ty::PredicateAtom::Projection(..)
+                    | ty::PredicateAtom::WellFormed(..)
+                    | ty::PredicateAtom::ObjectSafe(..)
+                    | ty::PredicateAtom::ClosureKind(..)
+                    | ty::PredicateAtom::Subtype(..)
+                    | ty::PredicateAtom::ConstEvaluatable(..)
+                    | ty::PredicateAtom::ConstEquate(..) => (),
                 }
             }