]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_trait_selection/src/traits/wf.rs
Do not require const predicates to hold when checking if a projection type is wf
[rust.git] / compiler / rustc_trait_selection / src / traits / wf.rs
index f95e217da3073997267fd9d936e41c7c8ee5b0b4..a86234291ca5700f58ae62c2df17e80641cdf899 100644 (file)
@@ -392,7 +392,8 @@ fn compute_projection(&mut self, data: ty::ProjectionTy<'tcx>) {
         //     `i32: Clone`
         //     `i32: Copy`
         // ]
-        let obligations = self.nominal_obligations(data.item_def_id, data.substs);
+        // Projection types do not require const predicates.
+        let obligations = self.nominal_obligations_without_const(data.item_def_id, data.substs);
         self.out.extend(obligations);
 
         let tcx = self.tcx();