Give a better error message for async pub fn
and const pub fn
#76437
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The parsing of Rust source code to an AST
A-visibility
Area: Visibility / privacy
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
It may be possible that developers get mixed up where pub visibility needs to be shown.
I am working on the first one, the second one looks harder to solve so I am not solving it.
It would be good to suggest the developer that
pub
needs to come beforeasync
orconst
. And I don't even know ifasync
should come beforeconst
or the other way around.The text was updated successfully, but these errors were encountered: