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: Swap fields and variant documentations #123116

Merged
merged 1 commit into from Mar 27, 2024

Conversation

zopsicle
Copy link
Contributor

Previously, the documentation for a variant appeared after the documentation for each of its fields. This was inconsistent with structs and unions, and made little sense on its own; fields are subordinate to variants and should therefore appear later in the documentation.

Before:

Screenshot of rendered documentation before this patch.

After:

Screenshot of rendered documentation after this patch.

Previously, the documentation for a variant appeared after the documentation
for each of its fields. This was inconsistent with structs and unions, and made
little sense on its own; fields are subordinate to variants and should
therefore appear later in the documentation.
@rustbot
Copy link
Collaborator

rustbot commented Mar 27, 2024

r? @GuillaumeGomez

rustbot has assigned @GuillaumeGomez.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Mar 27, 2024
@GuillaumeGomez
Copy link
Member

Nice, thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 27, 2024

📌 Commit 1942f95 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@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 Mar 27, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 27, 2024
…llaumeGomez

Rollup of 6 pull requests

Successful merges:

 - rust-lang#121843 (Implement `-L KIND=`@RUSTC_BUILTIN/...`)`
 - rust-lang#122860 (coverage: Re-enable `UnreachablePropagation` for coverage builds)
 - rust-lang#123021 (Make `TyCtxt::coroutine_layout` take coroutine's kind parameter)
 - rust-lang#123024 (CFI: Enable KCFI testing of run-pass tests)
 - rust-lang#123083 (lib: fix some unnecessary_cast clippy lint)
 - rust-lang#123116 (rustdoc: Swap fields and variant documentations)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c0945f0 into rust-lang:master Mar 27, 2024
11 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 27, 2024
Rollup merge of rust-lang#123116 - chloekek:rustdoc-variant-swap-fields-doc, r=GuillaumeGomez

rustdoc: Swap fields and variant documentations

Previously, the documentation for a variant appeared after the documentation for each of its fields. This was inconsistent with structs and unions, and made little sense on its own; fields are subordinate to variants and should therefore appear later in the documentation.

Before:

![Screenshot of rendered documentation before this patch.](https://github.com/rust-lang/rust/assets/50083900/4c98258e-bdf7-4507-9cf1-fe601407ff11)

After:

![Screenshot of rendered documentation after this patch.](https://github.com/rust-lang/rust/assets/50083900/bd223f92-9b06-4b5a-820e-7a8501bdc0e2)
@rustbot rustbot added this to the 1.79.0 milestone Mar 27, 2024
@zopsicle zopsicle deleted the rustdoc-variant-swap-fields-doc branch March 27, 2024 13:27
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.

None yet

4 participants