improve suggestion when writing "fn Trait for Ty" instead of "impl Trait for Ty" #105366
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code:
The current output is:
I wonder if we can detect that this is supposed to be trait impl, maybe look for
<Trait> for <Ty>
or something?Ideally the output should look like:
The text was updated successfully, but these errors were encountered: