@@ -885,19 +885,18 @@ impl PartialOrd for Ordering {
885
885
/// The `lt`, `le`, `gt`, and `ge` methods of this trait can be called using
886
886
/// the `<`, `<=`, `>`, and `>=` operators, respectively.
887
887
///
888
- /// The methods of this trait must be consistent with each other and with those of `PartialEq` in
889
- /// the following sense:
890
- ///
891
- /// - `a == b` if and only if `partial_cmp(a, b) == Some(Equal)`.
892
- /// - `a < b` if and only if `partial_cmp(a, b) == Some(Less)`
893
- /// (ensured by the default implementation).
894
- /// - `a > b` if and only if `partial_cmp(a, b) == Some(Greater)`
895
- /// (ensured by the default implementation).
896
- /// - `a <= b` if and only if `a < b || a == b`
897
- /// (ensured by the default implementation).
898
- /// - `a >= b` if and only if `a > b || a == b`
899
- /// (ensured by the default implementation).
900
- /// - `a != b` if and only if `!(a == b)` (already part of `PartialEq`).
888
+ /// The methods of this trait must be consistent with each other and with those of [`PartialEq`].
889
+ /// The following conditions must hold:
890
+ ///
891
+ /// 1. `a == b` if and only if `partial_cmp(a, b) == Some(Equal)`.
892
+ /// 2. `a < b` if and only if `partial_cmp(a, b) == Some(Less)`
893
+ /// 3. `a > b` if and only if `partial_cmp(a, b) == Some(Greater)`
894
+ /// 4. `a <= b` if and only if `a < b || a == b`
895
+ /// 5. `a >= b` if and only if `a > b || a == b`
896
+ /// 6. `a != b` if and only if `!(a == b)`.
897
+ ///
898
+ /// Conditions 2–5 above are ensured by the default implementation.
899
+ /// Condition 6 is already ensured by [`PartialEq`].
901
900
///
902
901
/// If [`Ord`] is also implemented for `Self` and `Rhs`, it must also be consistent with
903
902
/// `partial_cmp` (see the documentation of that trait for the exact requirements). It's
0 commit comments