Skip to content

Commit

Permalink
Clarifying behavior of #[derive(Ord, PartialOrd)] in doc comments.
Browse files Browse the repository at this point in the history
Removing redundant statement about lexicographic ordering.
  • Loading branch information
anp committed Feb 9, 2016
1 parent 75271d8 commit e22770b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libcore/cmp.rs
Expand Up @@ -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`.
Expand Down Expand Up @@ -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> {
Expand Down

0 comments on commit e22770b

Please sign in to comment.