-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Prefer pub(super)
in unreachable_pub
lint suggestion
#132426
Conversation
This comment has been minimized.
This comment has been minimized.
Seems like, one can't reexport a mod go {
pub(super) use fpu_precision::set_precision;
mod fpu_precision {
pub(super) fn set_precision<T>() {} // should be `pub(crate)`
}
} |
3fe6228
to
9382e25
Compare
I've completely reworked the logic to better use the effective visibility. I've also locally tested the new logic on the @rustbot ready |
9382e25
to
435695a
Compare
435695a
to
bd82f93
Compare
FWIW, I personally find the difference between Is this change worth the extra complexity? |
It's written in a very wordy way, but it's really just one condition when we reset the default |
bd82f93
to
0bc622d
Compare
I've reduced it all to a single (somewhat small) |
Have you done a stage 2 build so that the new behaviour is applied to the compiler's own code? Presumably it would require making a lot of additional changes, because |
I haven't tested it on the compiler but as said in #132426 (comment) I have tested it for |
How many changes were necessary? |
I don't really understand the question, but what I did is just a I didn't have to fix anything after the Footnotes
|
The question is how big is the diff obtained when running |
After discussing on Zulip: I was mistakenly thinking that this would suggest |
@bors r+ |
…iaskrgr Rollup of 3 pull requests Successful merges: - rust-lang#131781 (Stabilize Arm64EC inline assembly) - rust-lang#132426 (Prefer `pub(super)` in `unreachable_pub` lint suggestion) - rust-lang#132866 (Break from review rotation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#132426 - Urgau:unreach_pub-super, r=petrochenkov Prefer `pub(super)` in `unreachable_pub` lint suggestion This PR updates the `unreachable_pub` lint suggestion to prefer `pub(super)` instead of `pub(crate)` when possible. cc `@petrochenkov` r? `@nnethercote`
…enkov Prefer `pub(super)` in `unreachable_pub` lint suggestion This PR updates the `unreachable_pub` lint suggestion to prefer `pub(super)` instead of `pub(crate)` when possible. cc `@petrochenkov` r? `@nnethercote`
…iaskrgr Rollup of 3 pull requests Successful merges: - rust-lang#131781 (Stabilize Arm64EC inline assembly) - rust-lang#132426 (Prefer `pub(super)` in `unreachable_pub` lint suggestion) - rust-lang#132866 (Break from review rotation) r? `@ghost` `@rustbot` modify labels: rollup
This PR updates the
unreachable_pub
lint suggestion to preferpub(super)
instead ofpub(crate)
when possible.cc @petrochenkov
r? @nnethercote