-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion for pub(crate) doesn't handle reexports well #57410
Labels
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
Comments
Should it suggest |
Wouldn't that be a change in semantics ( |
Centril
added a commit
to Centril/rust
that referenced
this issue
Jan 28, 2019
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.
bors
added a commit
that referenced
this issue
Feb 3, 2019
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First reported upstream this code:
gives the warning:
but the suggestions, when applied, doesn't compile!
The text was updated successfully, but these errors were encountered: