-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Associated type projections don't count for local types in trait impls #87350
Copy link
Copy link
Closed
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)A-coherenceArea: CoherenceArea: CoherenceC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)A-coherenceArea: CoherenceArea: CoherenceC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I ran into a case with generated code today where I believe the compiler is giving a false error trying to verify a trait implementation.
Given a crate
foodefined as:and then a consumer crate
bar:when compiled this yields:
I don't believe that the error here is accurate since
A,B,C, andMyTypeare all local to the crate and the compiler would ideally follow the projection to conclude that this trait implementation is valid.