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

rustdoc: Don't show hidden trait methods #89198

Merged
merged 2 commits into from
Sep 26, 2021

Conversation

hkmatsumoto
Copy link
Member

Fix #89186.

By skipping trait items whose attributes include hidden, we avoid showing such trait methods.

@rust-highfive
Copy link
Collaborator

r? @ollie27

(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 Sep 23, 2021
@hkmatsumoto
Copy link
Member Author

r? @jyn514

@rust-highfive rust-highfive assigned jyn514 and unassigned ollie27 Sep 23, 2021
@hkmatsumoto hkmatsumoto marked this pull request as draft September 23, 2021 07:36
@rust-log-analyzer

This comment has been minimized.

@jyn514 jyn514 added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Sep 23, 2021
Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test for this? It would go in src/test/rustdoc, there are instructions at https://rustc-dev-guide.rust-lang.org/rustdoc-internals.html#dotting-is-and-crossing-ts :)

The code looks great though!

@jyn514 jyn514 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 23, 2021
@hkmatsumoto
Copy link
Member Author

hkmatsumoto commented Sep 23, 2021

2021-09-24-003435_7680x2160_scrot
Documenting with --document-hidden-items the indent is broken, and I'm a little clueless about what's causing this; do you have an idea on what could be wrong?

@hkmatsumoto hkmatsumoto marked this pull request as ready for review September 23, 2021 15:39
@hkmatsumoto hkmatsumoto added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 23, 2021
@jyn514 jyn514 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 23, 2021
@hkmatsumoto hkmatsumoto requested a review from jyn514 September 25, 2021 07:10
@hkmatsumoto hkmatsumoto added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 25, 2021
By skipping trait items whose attributes include `hidden`, we void
showing
such trait methods.
Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you! r=me with or without the nit (please use r=jyn514, not r+).

src/librustdoc/clean/inline.rs Outdated Show resolved Hide resolved
@jyn514
Copy link
Member

jyn514 commented Sep 25, 2021

@bors delegate=hkmatsumoto

@bors
Copy link
Contributor

bors commented Sep 25, 2021

✌️ @hkmatsumoto can now approve this pull request

Co-authored-by: Joshua Nelson <github@jyn.dev>
@hkmatsumoto
Copy link
Member Author

@bors r=jyn514

@bors
Copy link
Contributor

bors commented Sep 25, 2021

📌 Commit 195f752 has been approved by jyn514

@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 Sep 25, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 26, 2021
…arth

Rollup of 7 pull requests

Successful merges:

 - rust-lang#88895 (rustdoc: Cleanup `clean` part 2)
 - rust-lang#88973 (Expose the std_detect env_override feature)
 - rust-lang#89010 (Add some intra doc links)
 - rust-lang#89198 (rustdoc: Don't show hidden trait methods)
 - rust-lang#89216 (Consistent big O notation)
 - rust-lang#89224 (Change the order of imports suggestions)
 - rust-lang#89256 (Fix typo in release notes)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c118d8b into rust-lang:master Sep 26, 2021
@rustbot rustbot added this to the 1.57.0 milestone Sep 26, 2021
@jyn514
Copy link
Member

jyn514 commented Sep 26, 2021

@hkmatsumoto thank you for fixing this, it's awesome work!

@hkmatsumoto hkmatsumoto deleted the hide-hidden-methods branch September 26, 2021 16:38
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.

Rustdoc does not hide implementations of doc(hidden) trait methods
8 participants