Skip to content

Commit 8b81f76

Browse files
committed
Make note of Ord's derive ordering
Fixes #26620
1 parent fdf219d commit 8b81f76

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libcore/cmp.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ impl Ordering {
166166
///
167167
/// - total and antisymmetric: exactly one of `a < b`, `a == b` or `a > b` is true; and
168168
/// - transitive, `a < b` and `b < c` implies `a < c`. The same must hold for both `==` and `>`.
169+
///
170+
/// When this trait is `derive`d, it produces a lexicographic ordering.
169171
#[stable(feature = "rust1", since = "1.0.0")]
170172
pub trait Ord: Eq + PartialOrd<Self> {
171173
/// This method returns an `Ordering` between `self` and `other`.

0 commit comments

Comments
 (0)