Want better error for impl<some generics> impl Trait for Type {...} #109963
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
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
I made this mistake and didn't spot that the
^^^^
were pointing at the whole ofimpl Trait
rather than justTrait
and spent several minutes thinking "butTrait
is a trait!".Probably my "desired output" could be improved. Maybe replacing rather than supplementing the "expected trait, not type" would be better.
Other cases
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: