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

Sort unstable items last in rustdoc, instead of first #118224

Merged
merged 2 commits into from Nov 24, 2023

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Nov 24, 2023

As far as I can tell, this is a bug introduced inadvertently by #77817 in Rust 1.49. Older toolchains used to sort unstable items last.

Notice how in the code before that PR, (Unstable, Stable) => return Ordering::Greater in src/librustdoc/html/render/mod.rs. Whereas after that PR, (Unstable, Stable) => return Ordering::Less.

Compare https://doc.rust-lang.org/1.48.0/std/marker/index.html vs https://doc.rust-lang.org/1.49.0/std/marker/index.html.

@rustbot
Copy link
Collaborator

rustbot commented Nov 24, 2023

r? @fmease

(rustbot has picked a reviewer for you, use r? to override)

@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 Nov 24, 2023
@fmease
Copy link
Member

fmease commented Nov 24, 2023

Very good catch, thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 24, 2023

📌 Commit b77aa74 has been approved by fmease

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 Nov 24, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 24, 2023
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#116807 (Improve rewind documentation)
 - rust-lang#117656 (Update windows-bindgen and define `INVALID_HANDLE_VALUE` ourselves)
 - rust-lang#117940 (chore: remove unnecessary drop)
 - rust-lang#118028 (Document behavior of `<dyn Any as Any>::type_id()`)
 - rust-lang#118060 (Use an absolute path to the NUL device)
 - rust-lang#118224 (Sort unstable items last in rustdoc, instead of first)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 98bae81 into rust-lang:master Nov 24, 2023
11 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 24, 2023
Rollup merge of rust-lang#118224 - dtolnay:rustdocsortunstable, r=fmease

Sort unstable items last in rustdoc, instead of first

As far as I can tell, this is a bug introduced inadvertently by rust-lang#77817 in Rust 1.49. Older toolchains used to sort unstable items last.

Notice how in the code before that PR, `(Unstable, Stable) => return Ordering::Greater` in src/librustdoc/html/render/mod.rs. Whereas after that PR, `(Unstable, Stable) => return Ordering::Less`.

Compare https://doc.rust-lang.org/1.48.0/std/marker/index.html vs https://doc.rust-lang.org/1.49.0/std/marker/index.html.
@rustbot rustbot added this to the 1.76.0 milestone Nov 24, 2023
@dtolnay dtolnay deleted the rustdocsortunstable branch November 24, 2023 17:00
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