Better error message for 'is private' #63942
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
A-visibility
Area: Visibility / privacy
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Produces the error:
playground link
It would be great if the error message said why the pub struct 'A' is private.
For example something like this:
This would remove the head scratching time as one looks at the definition of the struct and sees the
pub
visibility modifier.The text was updated successfully, but these errors were encountered: