Open jgh713 opened 1 month ago
Additionally it seems like there's something else screwy with this lint. Attempting to ignore it with:
#[allow(clippy::needless_pub_self)]
pub(self) use vis_methods;
causes a compile error with the following text:
useless lint attribute
for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_attribute
`#[deny(clippy::useless_attribute)]` on by default
You have to go all the way and use both:
#[allow(clippy::useless_attribute)]
#[allow(clippy::needless_pub_self)]
pub(self) use vis_methods;
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