Error when failing to find macro should suggest pub(crate)
#121773
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
A-visibility
Area: Visibility / privacy
D-lack-of-suggestion
Diagnostics: Adding a (structured) suggestion would increase the quality of the diagnostic.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
(This could be an actual rustfix suggestion, though it should not have high certainty since they may not have intended to use a private macro.)
Rationale and extra context
We already give a better error for attempting to call a private function; this applies the same logic to private macros.
Rust Version
The text was updated successfully, but these errors were encountered: