Variance not computed for concrete GAT references in struct fields #132198
Labels
A-GATs
Area: Generic associated types (GATs)
A-variance
Area: Variance (https://doc.rust-lang.org/nomicon/subtyping.html)
C-discussion
Category: Discussion or questions that doesn't represent real issues.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Similar to #114221 (comment).
I tried this code:
I expected to see this happen: lifetime check passes
Instead, this happened:
Although lifetime variance does get computed when the GAT type is directly referenced in the parameter type:
Edit:
Sames limitation on types:
Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: