Skip to content

Fix too-short variance slice in variances_of cycle recovery#158163

Draft
xmakro wants to merge 1 commit into
rust-lang:mainfrom
xmakro:fix-variances-cycle-recovery-count
Draft

Fix too-short variance slice in variances_of cycle recovery#158163
xmakro wants to merge 1 commit into
rust-lang:mainfrom
xmakro:fix-variances-cycle-recovery-count

Conversation

@xmakro

@xmakro xmakro commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

This changes the cycle-error fallback in variances_of to size the slice the same way the provider does in variance/solve.rs:117.

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 #154560 (comment)

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants