needless_pub_self lint when necessary for crate macros #12808
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
Simple false positive. needless_pub_self lint is giving warnings when pub(self) is actually necessary to import macros anywhere below crate level. Removing the pub(self) causes compilation error on unresolved import.
Lint Name
needless_pub_self
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
Lint shouldn't trigger.
Version
Additional Labels
@rustbot label +l-suggestion-causes-error
The text was updated successfully, but these errors were encountered: