diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2022-08-28 04:02:43 +0000 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2022-09-16 11:48:42 +0800 |
| commit | 42316617898cacd52489121e9abebeff247e0840 (patch) | |
| tree | 147a4093e7305ddfa9e64e3eb5a4aece16f7a346 /compiler/rustc_trait_selection/src | |
| parent | 4b539b04a6a6fbe77ee6168716f5d282bc0e5e49 (diff) | |
| download | rust-42316617898cacd52489121e9abebeff247e0840.tar.gz rust-42316617898cacd52489121e9abebeff247e0840.zip | |
Do not require const predicates to hold when checking if a projection type is wf
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/wf.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/wf.rs b/compiler/rustc_trait_selection/src/traits/wf.rs index f95e217da30..a86234291ca 100644 --- a/compiler/rustc_trait_selection/src/traits/wf.rs +++ b/compiler/rustc_trait_selection/src/traits/wf.rs @@ -392,7 +392,8 @@ impl<'tcx> WfPredicates<'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(); |
