mirror of
https://github.com/allankoechke/rust.git
synced 2026-11-30 11:05:36 +00:00
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`](32ea3615cc/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 https://github.com/rust-lang/rust/issues/154560#issuecomment-4749155547