Skip to content

Commit 4231661

Browse files
committed
Do not require const predicates to hold when checking if a projection type is wf
1 parent 4b539b0 commit 4231661

File tree

1 file changed

+2
-1
lines changed
  • compiler/rustc_trait_selection/src/traits

1 file changed

+2
-1
lines changed

compiler/rustc_trait_selection/src/traits/wf.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,8 @@ impl<'tcx> WfPredicates<'tcx> {
392392
// `i32: Clone`
393393
// `i32: Copy`
394394
// ]
395-
let obligations = self.nominal_obligations(data.item_def_id, data.substs);
395+
// Projection types do not require const predicates.
396+
let obligations = self.nominal_obligations_without_const(data.item_def_id, data.substs);
396397
self.out.extend(obligations);
397398

398399
let tcx = self.tcx();

0 commit comments

Comments
 (0)