]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_typeck/check/dropck.rs
introduce PredicateAtom
[rust.git] / src / librustc_typeck / check / dropck.rs
index f6991120f347989da516a95e7cd58c979805d0d6..88c47b38ccc40b4e3ade7e772416e6304abd54f0 100644 (file)
@@ -226,12 +226,12 @@ fn ensure_drop_predicates_are_implied_by_item_defn<'tcx>(
         // could be extended easily also to the other `Predicate`.
         let predicate_matches_closure = |p: Predicate<'tcx>| {
             let mut relator: SimpleEqRelation<'tcx> = SimpleEqRelation::new(tcx, self_param_env);
-            match (predicate.kind(), p.kind()) {
-                (&ty::PredicateKind::Trait(a, _), &ty::PredicateKind::Trait(b, _)) => {
-                    relator.relate(a, b).is_ok()
+            match (predicate.skip_binders(), p.skip_binders()) {
+                (ty::PredicateAtom::Trait(a, _), ty::PredicateAtom::Trait(b, _)) => {
+                    relator.relate(ty::Binder::bind(a), ty::Binder::bind(b)).is_ok()
                 }
-                (&ty::PredicateKind::Projection(a), &ty::PredicateKind::Projection(b)) => {
-                    relator.relate(a, b).is_ok()
+                (ty::PredicateAtom::Projection(a), ty::PredicateAtom::Projection(b)) => {
+                    relator.relate(ty::Binder::bind(a), ty::Binder::bind(b)).is_ok()
                 }
                 _ => predicate == p,
             }