about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorAdam Perry <adam.n.perry@gmail.com>2016-02-08 22:57:24 -0700
committerAdam Perry <adam.n.perry@gmail.com>2016-02-09 08:01:28 -0700
commite22770beeb30f8ca04ab74ecd56ee56dcc2a234e (patch)
tree814fff20eba13d5fa93f211a05cc00300181b60d /src/libcore
parent75271d8f1ad12ff8b9e97c4df1c94e7b3911e485 (diff)
downloadrust-e22770beeb30f8ca04ab74ecd56ee56dcc2a234e.tar.gz
rust-e22770beeb30f8ca04ab74ecd56ee56dcc2a234e.zip
Clarifying behavior of #[derive(Ord, PartialOrd)] in doc comments.
Removing redundant statement about lexicographic ordering.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/cmp.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs
index b8bf54628ac..042cbea64bd 100644
--- a/src/libcore/cmp.rs
+++ b/src/libcore/cmp.rs
@@ -165,9 +165,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.
-///
-/// This trait can be used with `#[derive]`.
+/// This trait can be used with `#[derive]`. When `derive`d, it will produce a lexicographic
+/// ordering based on the top-to-bottom declaration order of the struct's members.
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait Ord: Eq + PartialOrd<Self> {
     /// This method returns an `Ordering` between `self` and `other`.
@@ -225,7 +224,8 @@ impl PartialOrd for Ordering {
 /// total order. For example, for floating point numbers, `NaN < 0 == false` and `NaN >= 0 ==
 /// false` (cf. IEEE 754-2008 section 5.11).
 ///
-/// This trait can be used with `#[derive]`.
+/// This trait can be used with `#[derive]`. When `derive`d, it will produce an ordering
+/// based on the top-to-bottom declaration order of the struct's members.
 #[lang = "ord"]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {