Commit c997ea4
authored
Rollup merge of rust-lang#158163 - xmakro:fix-variances-cycle-recovery-count, r=petrochenkov
Fix too-short variance slice in `variances_of` cycle recovery
This changes the cycle-error fallback in `variances_of` to size the slice the same way the provider does in [`variance/solve.rs:117`](https://github.com/rust-lang/rust/blob/32ea3615cc027bcb8fd720c7511ffb484f6223a3/compiler/rustc_hir_analysis/src/variance/solve.rs#L117).
This can otherwise ICE under the parallel frontend in `relate_args_with_variances` for items that inherit their generics from a parent (like a tuple struct constructor). See rust-lang#154560 (comment)1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
0 commit comments