-
Notifications
You must be signed in to change notification settings - Fork 13.3k
unreachable_pub lint ignores nested re-exports #47816
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
After inserting some logging statments, it looks like what's going on here is that
It seems like this behavior is intended?—librustc_privacy's |
↑ Unless someone understands how the reachability analysis needs to change, and given the increased prominence of this lint owing to the 2018 edition, we might want to quickly PR a change that declines to lint |
Update visibility of intermediate use items. Fixes rust-lang#57410 and fixes rust-lang#53925 and fixes rust-lang#47816. Currently, the target of a use statement will be updated with the visibility of the use statement itself (if the use statement was visible). This PR ensures that if the path to the target item is via another use statement then that intermediate use statement will also have the visibility updated like the target. This silences incorrect `unreachable_pub` lints with inactionable suggestions.
Update visibility of intermediate use items. Fixes #57410 and fixes #53925 and fixes #47816. Currently, the target of a use statement will be updated with the visibility of the use statement itself (if the use statement was visible). This PR ensures that if the path to the target item is via another use statement then that intermediate use statement will also have the visibility updated like the target. This silences incorrect `unreachable_pub` lints with inactionable suggestions.
Playground: https://play.rust-lang.org/?gist=d9e9fe07b83f07a3f9b908c0c7405a99&version=nightly
A single level of re-export works:
The text was updated successfully, but these errors were encountered: