Skip to content

Commit d935a26

Browse files
authored
Less-than is asymmetric, not antisymmetric
This has bothered me for a while. It's such a small nit, but...
1 parent 9d6f871 commit d935a26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/cmp.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ impl<T: Ord> Ord for Reverse<T> {
495495
///
496496
/// An order is a total order if it is (for all `a`, `b` and `c`):
497497
///
498-
/// - total and antisymmetric: exactly one of `a < b`, `a == b` or `a > b` is true; and
498+
/// - total and asymmetric: exactly one of `a < b`, `a == b` or `a > b` is true; and
499499
/// - transitive, `a < b` and `b < c` implies `a < c`. The same must hold for both `==` and `>`.
500500
///
501501
/// ## Derivable
@@ -674,7 +674,7 @@ impl PartialOrd for Ordering {
674674
///
675675
/// The comparison must satisfy, for all `a`, `b` and `c`:
676676
///
677-
/// - antisymmetry: if `a < b` then `!(a > b)`, as well as `a > b` implying `!(a < b)`; and
677+
/// - asymmetry: if `a < b` then `!(a > b)`, as well as `a > b` implying `!(a < b)`; and
678678
/// - transitivity: `a < b` and `b < c` implies `a < c`. The same must hold for both `==` and `>`.
679679
///
680680
/// Note that these requirements mean that the trait itself must be implemented symmetrically and

0 commit comments

Comments
 (0)