no associated item found for struct in the current scope while it exists #71054
Labels
A-associated-items
Area: Associated items (types, constants & functions)
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
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 Trait
does not solve the issue, and fails with a different error:Error:
Adding
{}
:Fails with:
The text was updated successfully, but these errors were encountered: