Compile or improve error message for static Self
#119936
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
The message says
use of generic parameter from outer item - refer to the type directly here instead
This makes you believe that
Self
is a generic type, but it isn't.MyStruct
can also be known at compile time at doesn't have generics attached to it, so maybe it could even compile.Other cases
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: