-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Fix Ord violations in rustdoc items sorting #128139
Conversation
Failed to set assignee to
|
Ah, they're not part of a Rust team. In this case: r? @notriddle |
This comment has been minimized.
This comment has been minimized.
04665f3
to
e3fdafc
Compare
match ln.cmp(&rn) { | ||
Ordering::Equal => (), | ||
match (lb.parse::<u64>(), rb.parse::<u64>()) { | ||
(Err(_), Err(_)) => return Ordering::Equal, |
There was a problem hiding this comment.
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.
Closing in favor of #128146. |
…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
…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
Needed for #128083.
Nice explanations of the ord violations can be found here.
r? @orlp