]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_traits/normalize_erasing_regions.rs
introduce PredicateAtom
[rust.git] / src / librustc_traits / normalize_erasing_regions.rs
index 7092515af0882709a597517b3d1a875d19220082..83aee31a39f3c223ae6af037ac29ebda5cacc3b2 100644 (file)
@@ -39,16 +39,16 @@ fn normalize_generic_arg_after_erasing_regions<'tcx>(
     })
 }
 
-fn not_outlives_predicate(p: &ty::Predicate<'_>) -> bool {
-    match p.kind() {
-        ty::PredicateKind::RegionOutlives(..) | ty::PredicateKind::TypeOutlives(..) => false,
-        ty::PredicateKind::Trait(..)
-        | ty::PredicateKind::Projection(..)
-        | ty::PredicateKind::WellFormed(..)
-        | ty::PredicateKind::ObjectSafe(..)
-        | ty::PredicateKind::ClosureKind(..)
-        | ty::PredicateKind::Subtype(..)
-        | ty::PredicateKind::ConstEvaluatable(..)
-        | ty::PredicateKind::ConstEquate(..) => true,
+fn not_outlives_predicate(p: &ty::Predicate<'tcx>) -> bool {
+    match p.skip_binders() {
+        ty::PredicateAtom::RegionOutlives(..) | ty::PredicateAtom::TypeOutlives(..) => false,
+        ty::PredicateAtom::Trait(..)
+        | ty::PredicateAtom::Projection(..)
+        | ty::PredicateAtom::WellFormed(..)
+        | ty::PredicateAtom::ObjectSafe(..)
+        | ty::PredicateAtom::ClosureKind(..)
+        | ty::PredicateAtom::Subtype(..)
+        | ty::PredicateAtom::ConstEvaluatable(..)
+        | ty::PredicateAtom::ConstEquate(..) => true,
     }
 }