Give a better error message for =>
in a return type
#77019
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
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.
Spot the difference (playground):
Notice how this gives a hard parse error and doesn't even mention return types. Instead, it should suggest
g() -> usize
.The text was updated successfully, but these errors were encountered: