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: Fix natural ordering to look at all numbers. #75347

Merged
merged 1 commit into from
Aug 11, 2020

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Aug 9, 2020

The old implementation only looks at numbers at the end, but not in other places in a name: u8 and u16 got sorted properly, but u8_bla and u16_bla did not.

image

Edit: Also fixes bugs in the old sorting code:

image

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

I really like this change! What do you think @rust-lang/rustdoc ?

@ollie27 ollie27 added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Aug 9, 2020
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.

Looks good to me :)

src/librustdoc/html/render/tests.rs Outdated Show resolved Hide resolved
The old implementation only looks at numbers at the end, but not in
other places in a name: "u8" and "u16" got sorted properly, but "u8_bla"
and "u16_bla" did not.
@Dylan-DPC-zz
Copy link

@bors r=GuillaumeGomez rollup

@bors
Copy link
Contributor

bors commented Aug 10, 2020

📌 Commit 8c705f8 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 Aug 10, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 11, 2020
Rollup of 10 pull requests

Successful merges:

 - rust-lang#74744 (Update RELEASES.md for 1.46.0)
 - rust-lang#75085 (Transmute big endian `s6_addr` and `[u16; 8]`)
 - rust-lang#75226 (Miri: Renamed "undef" to "uninit")
 - rust-lang#75333 (polymorphize: constrain unevaluated const handling)
 - rust-lang#75338 (move stack size check to const_eval machine)
 - rust-lang#75347 (Rustdoc: Fix natural ordering to look at all numbers.)
 - rust-lang#75352 (Tweak conditions for E0026 and E0769)
 - rust-lang#75353 (Tiny cleanup, remove unnecessary `unwrap`)
 - rust-lang#75359 (unused_delims: trim expr)
 - rust-lang#75360 (Add sample fix for E0749)

Failed merges:

r? @ghost
@bors bors merged commit a75bdfa into rust-lang:master Aug 11, 2020
@m-ou-se m-ou-se deleted the rustdoc-nat-sort branch August 11, 2020 15:05
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
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.

8 participants