Compiler diagnostic suggests wrong keyword order #94879
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.
If I write this code:
The compiler tells me:
That's a great message, very helpful... except the order is wrong. If I write:
The compiler gives me a weird error message.
The correct order is
pub
,default
,const
,async
,unsafe
,extern
; in other words,pub
before everything else.Indeed, the following code compiles without complaint:
(as well as other variants with
pub(crate)
,crate
, etc)The diagnostic suggestion should be fixed.
The text was updated successfully, but these errors were encountered: