We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf3959c commit 445dadcCopy full SHA for 445dadc
src/libcore/cmp.rs
@@ -474,8 +474,9 @@ impl<T: Ord> Ord for Reverse<T> {
474
///
475
/// Implementations of `PartialEq`, `PartialOrd`, and `Ord` *must*
476
/// agree with each other. That is, `a.cmp(b) == Ordering::Equal` if
477
-/// and only if `a == b`. It's easy to accidentally make them disagree
478
-/// by deriving some of the traits and manually implementing others.
+/// and only if `a == b` and `Some(a.cmp(b)) == a.partial_cmp(b)` for
+/// all `a` and `b`. It's easy to accidentally make them disagree by
479
+/// deriving some of the traits and manually implementing others.
480
481
/// Here's an example where you want to sort people by height only, disregarding `id`
482
/// and `name`:
0 commit comments