private_macro_use warning needs more information #136820
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
D-terse
Diagnostics: An error or lint that doesn't give enough information about the problem at hand.
L-private_macro_use
Lint: private_macro_use
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Related: #120192 Tracking Issue for private_macro_use lint
The warning needs more information on why a macro is considered private, possibly with full module path. The following produces a warning with very little information to go on to figure out that it's picking up the Serialize coming from serde_with, instead of serde. Having the definition of Foo in another module makes it magic on how the Serialize is not imported. (but I would guess that's an issue with #[macro_use]
Interestingly the #[macro_use] is considered unused by the compiler as well, but removing that produces an import error (correctly).
My Cargo.toml contains:
The text was updated successfully, but these errors were encountered: