Fn(a: u8)
should get a clear diagnostic
#140169
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The lexing & parsing of Rust source code to an AST
D-terse
Diagnostics: An error or lint that doesn't give enough information about the problem at hand.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
error: `Fn`-trait syntax does not allow named arguments
Rationale and extra context
fn f(_: fn(a: u8)) {}
is valid syntax, so the difference should get better diagnosticsOther cases
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: