@@ -43,6 +43,8 @@ use option::Option::{self, Some};
43
43
/// in terms of it by default. Any manual implementation of `ne` *must* respect
44
44
/// the rule that `eq` is a strict inverse of `ne`; that is, `!(a == b)` if and
45
45
/// only if `a != b`.
46
+ ///
47
+ /// This trait can be used with `#[derive]`.
46
48
#[ lang = "eq" ]
47
49
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
48
50
pub trait PartialEq < Rhs : ?Sized = Self > {
@@ -69,6 +71,8 @@ pub trait PartialEq<Rhs: ?Sized = Self> {
69
71
///
70
72
/// This property cannot be checked by the compiler, and therefore `Eq` implies
71
73
/// `PartialEq`, and has no extra methods.
74
+ ///
75
+ /// This trait can be used with `#[derive]`.
72
76
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
73
77
pub trait Eq : PartialEq < Self > {
74
78
// FIXME #13101: this method is used solely by #[deriving] to
@@ -171,6 +175,8 @@ impl Ordering {
171
175
/// - transitive, `a < b` and `b < c` implies `a < c`. The same must hold for both `==` and `>`.
172
176
///
173
177
/// When this trait is `derive`d, it produces a lexicographic ordering.
178
+ ///
179
+ /// This trait can be used with `#[derive]`.
174
180
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
175
181
pub trait Ord : Eq + PartialOrd < Self > {
176
182
/// This method returns an `Ordering` between `self` and `other`.
@@ -227,6 +233,8 @@ impl PartialOrd for Ordering {
227
233
/// However it remains possible to implement the others separately for types which do not have a
228
234
/// total order. For example, for floating point numbers, `NaN < 0 == false` and `NaN >= 0 ==
229
235
/// false` (cf. IEEE 754-2008 section 5.11).
236
+ ///
237
+ /// This trait can be used with `#[derive]`.
230
238
#[ lang = "ord" ]
231
239
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
232
240
pub trait PartialOrd < Rhs : ?Sized = Self > : PartialEq < Rhs > {
0 commit comments