]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_trait_selection/traits/mod.rs
introduce PredicateAtom
[rust.git] / src / librustc_trait_selection / traits / mod.rs
index 1c3755222495e28585dbb4d83efb2d57de7b8ee9..afa48c2f76cf8a0fb79b77e4a6a246518c7e68a1 100644 (file)
@@ -328,8 +328,8 @@ pub fn normalize_param_env_or_error<'tcx>(
     // This works fairly well because trait matching  does not actually care about param-env
     // TypeOutlives predicates - these are normally used by regionck.
     let outlives_predicates: Vec<_> = predicates
-        .drain_filter(|predicate| match predicate.kind() {
-            ty::PredicateKind::TypeOutlives(..) => true,
+        .drain_filter(|predicate| match predicate.skip_binders() {
+            ty::PredicateAtom::TypeOutlives(..) => true,
             _ => false,
         })
         .collect();