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: do not emit tuple variant fields if none are documented #91687

Merged
merged 1 commit into from
Jan 14, 2022

Conversation

euclio
Copy link
Contributor

@euclio euclio commented Dec 9, 2021

Fixes #90824.

Before:

2021-12-15T22:26:41

After:

2021-12-15T22:27:01

@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 9, 2021
@GuillaumeGomez
Copy link
Member

I'm not sure that we reached an agreement yet on the issue. Just in case: cc @Nemo157 @jsha @camelid

@GuillaumeGomez GuillaumeGomez added A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Dec 9, 2021
@jsha
Copy link
Contributor

jsha commented Dec 15, 2021

This looks good to me and is the approach that I was trying to express in the issue thread.

@euclio based on the screenshots, you may be building off an outdated master. We made some changes to the display of tuple fields recently and now they look like this (https://doc.rust-lang.org/nightly/std/path/enum.Prefix.html):

image

Would you mind pulling the latest and updating your branch and screenshots?

@camelid camelid 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 Dec 15, 2021
@euclio
Copy link
Contributor Author

euclio commented Dec 16, 2021

Rebased and updated screenshots.

@GuillaumeGomez
Copy link
Member

Can you also provide a case where a 0 field is documented as well please? Otherwise looks good to me.

@camelid
Copy link
Member

camelid commented Dec 17, 2021

@rustbot ready

@rustbot rustbot 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 Dec 17, 2021
@camelid
Copy link
Member

camelid commented Jan 9, 2022

@GuillaumeGomez this is waiting on a review I think.

@GuillaumeGomez
Copy link
Member

Arf indeed. I'll review it tomorrow morning then. Thanks for the ping!

@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r6

@GuillaumeGomez
Copy link
Member

With the correct command this time...

@bors: r+

@bors
Copy link
Contributor

bors commented Jan 10, 2022

📌 Commit ff12aed 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 10, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 10, 2022
@matthiaskrgr
Copy link
Member

@bors r-
failed in a rollup #92727 (comment)
maybe needs a rebase or something

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 10, 2022
@camelid

This comment has been minimized.

@rustbot rustbot 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 Jan 11, 2022
@camelid
Copy link
Member

camelid commented Jan 11, 2022

CI is failing.

@camelid camelid 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 Jan 11, 2022
@euclio euclio force-pushed the tuple-variant-field-section branch from 050f402 to 4193f2d Compare January 11, 2022 21:44
@euclio
Copy link
Contributor Author

euclio commented Jan 11, 2022

CI is now green.

@camelid

This comment has been minimized.

@rustbot rustbot 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 Jan 11, 2022
@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+

@bors
Copy link
Contributor

bors commented Jan 12, 2022

📌 Commit 4193f2d 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 12, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 12, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 13, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 14, 2022
…askrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#90001 (Make rlib metadata strip works with MIPSr6 architecture)
 - rust-lang#91687 (rustdoc: do not emit tuple variant fields if none are documented)
 - rust-lang#91938 (Add `std::error::Report` type)
 - rust-lang#92006 (Welcome opaque types into the fold)
 - rust-lang#92142 ([code coverage] Fix missing dead code in modules that are never called)
 - rust-lang#92277 (rustc_metadata: Stop passing `CrateMetadataRef` by reference (step 1))
 - rust-lang#92334 (rustdoc: Preserve rendering of macro_rules matchers when possible)
 - rust-lang#92807 (Update cargo)
 - rust-lang#92832 (Update RELEASES for 1.58.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3e7bc08 into rust-lang:master Jan 14, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 14, 2022
@euclio euclio deleted the tuple-variant-field-section branch January 14, 2022 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) 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: Tuple Fields of Variant section is superfluous and noisy if all fields are undocumented
8 participants