-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
no associated item found for struct in the current scope while it exists #71054
Copy link
Copy link
Open
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)C-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-langRelevant to the language teamRelevant to the language team
Metadata
Metadata
Assignees
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)C-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-langRelevant to the language teamRelevant to the language team
Type
Fields
Give feedbackNo fields configured for issues without a type.
The following code (playground):
Fails with this error:
However, if we alter
instance()slightly to either of these, the code compiles successfully:It is worth mentioning that explicitly using
as Traitdoes not solve the issue, and fails with a different error:Error:
Adding
{}:Fails with: