-
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
privacy: Type privacy lints fixes and cleanups #112670
Conversation
r? @eholk (rustbot has picked a reviewer for you, use r? to override) |
cc @Bryanskiy |
This comment has been minimized.
This comment has been minimized.
Use a boolean constant parameter instead. Also turn some methods on `DefIdVisitor` into associated constants.
…ility This commit reverts a change made in rust-lang#111425. It was believed that this change was necessary for implementing type privacy lints, but rust-lang#111801 showed that it was not necessary. Quite opposite, the revert fixes some issues.
Ping @eholk, it's been 2 weeks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the slow review! Thanks for breaking this out into different commits, that made it much easier to review.
@bors r+
if !(cx.effective_visibilities.is_reachable(item.owner_id.def_id) | ||
&& cx.tcx.local_visibility(item.owner_id.def_id).is_public()) | ||
{ | ||
if !cx.effective_visibilities.is_reachable(item.owner_id.def_id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the local visibility check just redundant because effective visibility is always stricter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bors r+ |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#112670 (privacy: Type privacy lints fixes and cleanups) - rust-lang#112929 (Test that we require implementing trait items whose bounds don't hold in the current impl) - rust-lang#113054 (Make `rustc_on_unimplemented` std-agnostic) - rust-lang#113137 (don't suggest `move` for borrows that aren't closures) - rust-lang#113139 (style-guide: Clarify let-else further) - rust-lang#113140 (style-guide: Add an example of formatting a multi-line attribute) - rust-lang#113143 (style-guide: Narrow guidance about references and dereferencing) r? `@ghost` `@rustbot` modify labels: rollup
See individual commits.
Follow up to #111801.