Skip to content
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

Fix rustdoc::private_doc_tests lint for public re-exported items #92349

Merged
merged 2 commits into from
Jan 6, 2022

Conversation

avitex
Copy link
Contributor

@avitex avitex commented Dec 28, 2021

Closes #72081

This involves changing the lint to check the access level is exported, rather than public.
The exported access level accounts for public items and items accessible to other crates with the help of pub use re-exports.
The pattern of re-exporting public items from a private module is usage seen in a number of popular crates.

This involves changing the lint to check the access level is exported,
rather than public. The exported access level accounts for public items
and items accessible to other crates with the help of `pub use`
re-exports. The pattern of re-exporting public items from a private
module is usage seen in a number of popular crates.
@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Dec 28, 2021
@rust-highfive
Copy link
Collaborator

r? @GuillaumeGomez

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 28, 2021
- Ensure standard public items are accepted
- Ensure public items not re-exported from private modules are denied
@avitex avitex force-pushed the fix-rustdoc-private-doc-tests branch from 9610afd to 992646b Compare December 28, 2021 13:56
@avitex
Copy link
Contributor Author

avitex commented Dec 28, 2021

Will this be able to make it to beta? I can rebase onto beta if needed

@GuillaumeGomez
Copy link
Member

I can nominate it to beta, but considering how old the issue is, I'm not sure it'll be accepted.

In any case, I'll approve it once CI pass.

@avitex
Copy link
Contributor Author

avitex commented Dec 28, 2021

If you can that would be great. It is low priority but cleans up an annoying little bug. If nomination requires any effort on my side like a rebase, happy to pick it up.

@GuillaumeGomez
Copy link
Member

Nothing on your side, it's done when the release is being done. They cherry-pick the commits from the nominated PRs and that's it.

@avitex
Copy link
Contributor Author

avitex commented Dec 28, 2021

Awesome, thanks for letting me know

@GuillaumeGomez GuillaumeGomez added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Dec 28, 2021
@GuillaumeGomez
Copy link
Member

I added the tag to the PR and the compiler-team will discuss it at their next meeting once this PR is merged.

@apiraino
Copy link
Contributor

Beta backport discussed and declined during compiler team meeting on Zulip, we can let this patch land in the next beta without backporting.

@rustbot label -beta-nominated

@rustbot rustbot removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Dec 30, 2021
@camelid
Copy link
Member

camelid commented Jan 5, 2022

In any case, I'll approve it once CI pass.

@GuillaumeGomez any updates?

@GuillaumeGomez
Copy link
Member

@camelid I completely forgot to approve it... Don't hesitate to review it as well. ;)

@bors: r+

@bors
Copy link
Contributor

bors commented Jan 5, 2022

📌 Commit 992646b has been approved by GuillaumeGomez

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 5, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 6, 2022
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#92058 (Make Run button visible on hover)
 - rust-lang#92288 (Fix a pair of mistyped test cases in `std::net::ip`)
 - rust-lang#92349 (Fix rustdoc::private_doc_tests lint for public re-exported items)
 - rust-lang#92360 (Some cleanups around check_argument_types)
 - rust-lang#92389 (Regression test for borrowck ICE rust-lang#92015)
 - rust-lang#92404 (Fix font size for [src] links in headers)
 - rust-lang#92443 (Rustdoc: resolve associated traits for non-generic primitive types)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4d0b567 into rust-lang:master Jan 6, 2022
@rustbot rustbot added this to the 1.59.0 milestone Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

warn(private_doc_tests) warns about republished items
7 participants