Properly suggest fn when function is used #99906
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code:
The current output is:
Ideally the output should look like:
help: you likely meant to define a function using the `fn` keyword instead
Rustc already does this to an extent, for eg. here
However, using a similar implementation to #99903, this could become ideal.
@rustbot claim
The text was updated successfully, but these errors were encountered: