Wrong diagnosis for extern "C" pub fn name() {}
#113342
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.
Code
Current output
Desired output
Rationale and extra context
The correct code here is
but the error doesn't suggest that
fn
keyword would be allowed here.Ideally we'd recover from this, and say "visibility isn't allowed for
extern
functions", but if that's not feasible, then we should accurately report the tokens allowed.Other cases
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: