On places that pub
would be "reasonable" but incorrect, provide better errors
#56473
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
When trying to incorrectly specify a pub
fn
in a trait, the error message just complains about the incorrect token:Ideally the compiler would explain that individual trait methods' visibility can't be modified, only the trait itself, and continue parsing the AST as if it were correct, possibly suggesting the following, if appropriate:
The text was updated successfully, but these errors were encountered: