Struct containing only associated type of generic may be too constraining variance wise #140109
Labels
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.
The following code is currently rejected by the compiler, because sub-typing for
S
is taken on the whole T and not only its associated type. Maybe this is something that could be improved?This also happens with nex-gen trait solver AFAICT.
The text was updated successfully, but these errors were encountered: