From 8b81f76593ce044b0d822f07061c93b515f7dc01 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Tue, 30 Jun 2015 18:46:31 -0400 Subject: [PATCH] Make note of Ord's derive ordering Fixes #26620 --- src/libcore/cmp.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index 0269499ad5414..52ed29c1b61f4 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -166,6 +166,8 @@ impl Ordering { /// /// - total and antisymmetric: exactly one of `a < b`, `a == b` or `a > b` is true; and /// - transitive, `a < b` and `b < c` implies `a < c`. The same must hold for both `==` and `>`. +/// +/// When this trait is `derive`d, it produces a lexicographic ordering. #[stable(feature = "rust1", since = "1.0.0")] pub trait Ord: Eq + PartialOrd { /// This method returns an `Ordering` between `self` and `other`.