Skip to content

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Jul 24, 2024

Needed for #128083.

Nice explanations of the ord violations can be found here.

r? @orlp

@rustbot
Copy link
Collaborator

rustbot commented Jul 24, 2024

Failed to set assignee to orlp: invalid assignee

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

@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
@GuillaumeGomez
Copy link
Member Author

Ah, they're not part of a Rust team. In this case:

r? @notriddle

@rust-log-analyzer

This comment has been minimized.

match ln.cmp(&rn) {
Ordering::Equal => (),
match (lb.parse::<u64>(), rb.parse::<u64>()) {
(Err(_), Err(_)) => return Ordering::Equal,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this result, either.

Let's just use the same function the style-guide recommends for rustfmt, unless there's a compelling reason not to.

@GuillaumeGomez
Copy link
Member Author

Closing in favor of #128146.

@GuillaumeGomez GuillaumeGomez deleted the fix-ord-violation branch July 24, 2024 19:00
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 24, 2024
…GuillaumeGomez

rustdoc: clean up and fix ord violations in item sorting

Based on rust-lang#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

[version sort]: https://doc.rust-lang.org/nightly/style-guide/index.html#sorting
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Jul 25, 2024
…Gomez

rustdoc: clean up and fix ord violations in item sorting

Based on rust-lang/rust#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

[version sort]: https://doc.rust-lang.org/nightly/style-guide/index.html#sorting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants