-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Edit docs introduction for std::cmp::PartialOrd
#93356
Conversation
This comment has been minimized.
This comment has been minimized.
r? @dtolnay (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
9f69df9
to
547caec
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
547caec
to
d29376b
Compare
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.
Thanks!
library/core/src/cmp.rs
Outdated
/// Trait for values that can be compared for a sort-order. | ||
/// Trait for types that form a [partial order](https://en.wikipedia.org/wiki/Partial_order). | ||
/// | ||
/// Values of types that are `PartialOrd` can be compared for a sort order. |
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.
Calling this a "sort order" is probably more harmful than helpful, given that you can't actually sort them. Sorting (as used in Rust in the standard library) implies total order. "Topological sort" can handle partial order but is a different thing.
Can you just take this part out? I think the very next sentence showing <
<=
etc will give anyone the right impression of what is being talked about.
This makes `PartialOrd` consistent with the other three traits in this module, which all include links to their respective mathematical concepts on Wikipedia.
d29376b
to
7c7509b
Compare
@rustbot ready |
@bors r+ rollup |
📌 Commit 7c7509b has been approved by |
The job Click to see the possible cause of the failure (guessed by this bot)
|
…lnay Edit docs introduction for `std::cmp::PartialOrd` This makes `PartialOrd` consistent with the other three traits in this module, which all include links to their corresponding mathematical concepts on Wikipedia. <img width="500" alt="Screen Shot 2022-01-26 at 10 24 23 PM" src="https://user-images.githubusercontent.com/19642016/151291720-decd85ed-cd6e-4be0-84a9-619b98ceb386.png">
…askrgr Rollup of 10 pull requests Successful merges: - rust-lang#92611 (Add links to the reference and rust by example for asm! docs and lints) - rust-lang#93158 (wasi: implement `sock_accept` and enable networking) - rust-lang#93239 (Add os::unix::net::SocketAddr::from_path) - rust-lang#93261 (Some unwinding related cg_ssa cleanups) - rust-lang#93295 (Avoid double panics when using `TempDir` in tests) - rust-lang#93353 (Unimpl {Add,Sub,Mul,Div,Rem,BitXor,BitOr,BitAnd}<$t> for Saturating<$t>) - rust-lang#93356 (Edit docs introduction for `std::cmp::PartialOrd`) - rust-lang#93375 (fix typo `documenation`) - rust-lang#93399 (rustbuild: Fix compiletest warning when building outside of root.) - rust-lang#93404 (Fix a typo from rust-lang#92899) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This makes
PartialOrd
consistent with the other three traits in this module, which all include links to their corresponding mathematical concepts on Wikipedia.