unreachable_pub
lint does not fire in the case of partial wildcard shadowing
#111360
Labels
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
A-resolve
Area: Name resolution
A-visibility
Area: Visibility / privacy
C-bug
Category: This is a bug.
L-unreachable_pub
Lint: unreachable_pub
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen:
When I uncomment
1.
(but not2.
) above, the lint correctly fires, and says:When I uncomment
1.
AND2.
above, the lint no longer fires, despite the export being shadowed (though - it is still otherwise reachable).Meta
Context from discussion on reddit, and other wildcard shadowing shenanigans
edit: made it
#![deny(unreachable_pub)]
not#[deny(unreachable_pub)]
The text was updated successfully, but these errors were encountered: