]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/traits/util.rs
Auto merge of #32780 - soltanmm:consider-the-following, r=nikomatsakis
[rust.git] / src / librustc / traits / util.rs
index 7668b8bf20282dc8422fdb0db9e1645b9765b23f..90def00be0730257168e79d6c312e5c14ca4d064 100644 (file)
@@ -60,6 +60,9 @@ fn insert(&mut self, pred: &ty::Predicate<'tcx>) -> bool {
 
             ty::Predicate::ObjectSafe(data) =>
                 ty::Predicate::ObjectSafe(data),
+
+            ty::Predicate::ClosureKind(closure_def_id, kind) =>
+                ty::Predicate::ClosureKind(closure_def_id, kind)
         };
         self.set.insert(normalized_pred)
     }
@@ -156,6 +159,9 @@ fn push(&mut self, predicate: &ty::Predicate<'tcx>) {
             ty::Predicate::Projection(..) => {
                 // Nothing to elaborate in a projection predicate.
             }
+            ty::Predicate::ClosureKind(..) => {
+                // Nothing to elaborate when waiting for a closure's kind to be inferred.
+            }
             ty::Predicate::RegionOutlives(..) |
             ty::Predicate::TypeOutlives(..) => {
                 // Currently, we do not "elaborate" predicates like