@@ -921,14 +921,18 @@ pub macro Ord($item:item) {
921
921
/// easy to accidentally make them disagree by deriving some of the traits and manually
922
922
/// implementing others.
923
923
///
924
- /// The comparison must satisfy, for all `a`, `b` and `c`:
924
+ /// The comparison relations must satisfy the following conditions
925
+ /// (for all `a`, `b`, `c` of type `A`, `B`, `C`):
925
926
///
926
- /// - transitivity: `a < b` and `b < c` implies `a < c`. The same must hold for both `==` and `>`.
927
- /// - duality: `a < b` if and only if `b > a`.
927
+ /// - **Transitivity**: if `A: PartialOrd<B>` and `B: PartialOrd<C>` and `A:
928
+ /// PartialOrd<C>`, then `a < b` and `b < c` implies `a < c`. The same must hold for both `==` and `>`.
929
+ /// This must also work for longer chains, such as when `A: PartialOrd<B>`, `B: PartialOrd<C>`,
930
+ /// `C: PartialOrd<D>`, and `A: PartialOrd<D>` all exist.
931
+ /// - **Duality**: if `A: PartialOrd<B>` and `B: PartialOrd<A>`, then `a < b` if and only if `b > a`.
928
932
///
929
- /// Note that these requirements mean that the trait itself must be implemented symmetrically and
930
- /// transitively: if `T: PartialOrd<U>` and `U: PartialOrd<V>` then `U: PartialOrd<T>` and `T:
931
- /// PartialOrd<V>` .
933
+ /// Note that the `B: PartialOrd<A>` (dual) and `A: PartialOrd<C>`
934
+ /// (transitive) impls are not forced to exist, but these requirements apply
935
+ /// whenever they do exist .
932
936
///
933
937
/// Violating these requirements is a logic error. The behavior resulting from a logic error is not
934
938
/// specified, but users of the trait must ensure that such logic errors do *not* result in
0 commit comments