|
9 | 9 | //! * [`Eq`] indicates that the overloaded `==` operator corresponds to an |
10 | 10 | //! equivalence relation. |
11 | 11 | //! * [`Ord`] and [`PartialOrd`] are traits that allow you to define total and |
12 | | -//! partial orderings between values, respectively. Implementing them overloads |
13 | | -//! the `<`, `<=`, `>`, and `>=` operators. |
| 12 | +//! strict partial orderings between values, respectively. Implementing them |
| 13 | +//! overloads the `<`, `<=`, `>`, and `>=` operators. |
14 | 14 | //! * [`Ordering`] is an enum returned by the main functions of [`Ord`] and |
15 | 15 | //! [`PartialOrd`], and describes an ordering of two values (less, equal, or |
16 | 16 | //! greater). |
@@ -1095,7 +1095,7 @@ pub macro Ord($item:item) { |
1095 | 1095 | /* compiler built-in */ |
1096 | 1096 | } |
1097 | 1097 |
|
1098 | | -/// Trait for types that form a [partial order](https://en.wikipedia.org/wiki/Partial_order). |
| 1098 | +/// Trait for types that form a [strict partial order](https://en.wikipedia.org/wiki/Strict_partial_order). |
1099 | 1099 | /// |
1100 | 1100 | /// The `lt`, `le`, `gt`, and `ge` methods of this trait can be called using the `<`, `<=`, `>`, and |
1101 | 1101 | /// `>=` operators, respectively. |
@@ -1163,7 +1163,8 @@ pub macro Ord($item:item) { |
1163 | 1163 | /// The following corollaries follow from the above requirements: |
1164 | 1164 | /// |
1165 | 1165 | /// - irreflexivity of `<` and `>`: `!(a < a)`, `!(a > a)` |
1166 | | -/// - transitivity of `>`: if `a > b` and `b > c` then `a > c` |
| 1166 | +/// - transitivity of `>`: if `a > b` and `b > c`, then `a > c` |
| 1167 | +/// - antisymmetry of `<=`: if `a <= b` and `b <= a`, then `a == b` |
1167 | 1168 | /// - duality of `partial_cmp`: `partial_cmp(a, b) == partial_cmp(b, a).map(Ordering::reverse)` |
1168 | 1169 | /// |
1169 | 1170 | /// ## Strict and non-strict partial orders |
|
0 commit comments