Skip to content

rustdoc: do not emit tuple variant fields if none are documented - #91687

Merged
bors merged 1 commit into
rust-lang:masterfrom
euclio:tuple-variant-field-section
Jan 14, 2022
Merged

rustdoc: do not emit tuple variant fields if none are documented#91687
bors merged 1 commit into
rust-lang:masterfrom
euclio:tuple-variant-field-section

Conversation

@euclio

@euclioeuclio commented Dec 9, 2021

Copy link
Copy Markdown
Contributor

Fixes#90824.

Before:

2021-12-15T22:26:41

After:

2021-12-15T22:27:01

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @GuillaumeGomez

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

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 9, 2021
@GuillaumeGomez

Copy link
Copy Markdown
Member

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

@GuillaumeGomezGuillaumeGomez 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

jsha commented Dec 15, 2021

Copy link
Copy Markdown
Contributor

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?

@camelidcamelid 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
euclioforce-pushed the tuple-variant-field-section branch from 15bcbed to c426044CompareDecember 16, 2021 03:27
@euclio

Copy link
Copy Markdown
ContributorAuthor

Rebased and updated screenshots.

@GuillaumeGomez

Copy link
Copy Markdown
Member

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

@euclio
euclioforce-pushed the tuple-variant-field-section branch from c426044 to ff12aedCompareDecember 17, 2021 00:15
@camelid

Copy link
Copy Markdown
Member

@rustbot ready

@rustbotrustbot 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
Copy Markdown
Member

@GuillaumeGomez this is waiting on a review I think.

@GuillaumeGomez

Copy link
Copy Markdown
Member

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

@GuillaumeGomez

Copy link
Copy Markdown
Member

Thanks!

@bors: r6

@GuillaumeGomez

Copy link
Copy Markdown
Member

With the correct command this time...

@bors: r+

@bors

bors commented Jan 10, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit ff12aed has been approved by GuillaumeGomez

@borsbors 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
Copy Markdown
Member

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

@borsbors 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.

@rustbotrustbot 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
Copy Markdown
Member

CI is failing.

@camelidcamelid 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
euclioforce-pushed the tuple-variant-field-section branch from 050f402 to 4193f2dCompareJanuary 11, 2022 21:44
@euclio

Copy link
Copy Markdown
ContributorAuthor

CI is now green.

@camelid

This comment has been minimized.

@rustbotrustbot 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
Copy Markdown
Member

Thanks!

@bors: r+

@bors

bors commented Jan 12, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit 4193f2d has been approved by GuillaumeGomez

@borsbors 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:masterJan 14, 2022
@rustbotrustbot 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustdoc-uiArea: Rustdoc UI (generated HTML)S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant 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

@euclio@rust-highfive@GuillaumeGomez@jsha@camelid@bors@matthiaskrgr@rustbot