Skip to content

rustdoc: clean up and fix ord violations in item sorting #128146

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

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

notriddle
Copy link
Contributor

@notriddle notriddle commented Jul 24, 2024

Based on #128139 with a few minor changes:

  • The name sorting function is changed to follow the version sort from the style guide
  • the cmp function is redesigned to more obviously make a partial order, by always return cmp() of the same variable as the != above

@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 Jul 24, 2024
@notriddle
Copy link
Contributor Author

CC @orlp

@notriddle notriddle force-pushed the notriddle/natsortfixes branch from 0de14c5 to b61e159 Compare July 24, 2024 17:22
@GuillaumeGomez
Copy link
Member

Thanks a lot for the improvements! It's indeed much better.

Just one nit in the commit message: it's Co-authored-by (with only one capital letter) based on https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors. Appreciate that you put me as co-author. :)

@notriddle notriddle force-pushed the notriddle/natsortfixes branch from b61e159 to e00adaf Compare July 24, 2024 18:07
Based on e3fdafc with a few
minor changes:

- The name sorting function is changed to follow the [version sort]
  from the style guide
- the `cmp` function is redesigned to more obviously make a
  partial order, by always return `cmp()` of the same variable as
  the `!=` above

[version sort]: https://doc.rust-lang.org/nightly/style-guide/index.html#sorting

Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
@notriddle notriddle force-pushed the notriddle/natsortfixes branch from e00adaf to 5384692 Compare July 24, 2024 18:08
@notriddle
Copy link
Contributor Author

Good catch. I've fixed it.

@GuillaumeGomez
Copy link
Member

r=me once CI is green.

@notriddle
Copy link
Contributor Author

@bors r=GuillaumeGomez

@bors
Copy link
Collaborator

bors commented Jul 24, 2024

📌 Commit 5384692 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 Jul 24, 2024
@GuillaumeGomez
Copy link
Member

It's blocking a release so let's increase the priority.

@bors p=10

@bors
Copy link
Collaborator

bors commented Jul 24, 2024

⌛ Testing commit 5384692 with merge c1a6199...

@bors
Copy link
Collaborator

bors commented Jul 24, 2024

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing c1a6199 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 24, 2024
@bors bors merged commit c1a6199 into rust-lang:master Jul 24, 2024
7 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Jul 24, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 24, 2024
[experiment] Bump stage0

I don't think it's exactly clear what the status of rust-lang#128083 is and whether or not we need a backport. Try applying the first three commits now that rust-lang#128146 has merged to verify whether or not we need a backport.
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c1a6199): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.7% [-1.6%, -0.2%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.7% [-1.6%, -0.2%] 4

Max RSS (memory usage)

Results (primary -0.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.2% [2.2%, 2.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.6% [-2.6%, -2.6%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-2.6%, 2.2%] 2

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 770.858s -> 772.173s (0.17%)
Artifact size: 328.89 MiB -> 328.95 MiB (0.02%)

@tgross35
Copy link
Contributor

@rustbot label +beta-nominated

As I understand it, we need this in the beta compiler to be able to do the stage0 bump at #128083. That PR is failing at an ICE in 1.81.0-beta.1, which should be fixed by this.

Since it is blocking a step in the release cycle, hopefully we can get this merged before the next dist run.

@GuillaumeGomez please correct me if this isn't accurate.

@rustbot rustbot added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 25, 2024
@Mark-Simulacrum Mark-Simulacrum added beta-accepted Accepted for backporting to the compiler in the beta channel. and removed beta-nominated Nominated for backporting to the compiler in the beta channel. labels Jul 25, 2024
@notriddle notriddle deleted the notriddle/natsortfixes branch July 25, 2024 01:05
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2024
…mulacrum

[beta] rustdoc: clean up and fix ord violations in item sorting

Cherry-picks "rustdoc: clean up and fix ord violations in item sorting rust-lang#128146" to beta.

r? `@Mark-Simulacrum`
@GuillaumeGomez
Copy link
Member

No this is exactly as stated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. merged-by-bors This PR was explicitly merged by bors. 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.

7 participants