-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Rustc Confuses Associated Types on Type Inference #82513
Copy link
Copy link
Open
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)A-trait-systemArea: Trait systemArea: Trait systemC-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.
Metadata
Metadata
Assignees
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)A-trait-systemArea: Trait systemArea: Trait systemC-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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
The following code does not compile (playground link):
I expected to see this happen: Successful compilation
Instead, this happened: I get
E0271Ways to get this to compile (that shouldn't matter/don't change the semantics):
wherebound<(T::AccountId, T::AccountId)>::default()Meta
rustc --version --verbose:(also happens on 1.52-nightly)