diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-11-17 15:12:14 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-11-17 15:12:14 +0530 |
| commit | e0adabf0ee33ea40317f719c11ba39c7fc296c0e (patch) | |
| tree | 6b0ba2a13036bc55864fd6a4db60987ee80114bb /src/libcore | |
| parent | ff2f74561de9ef90f1ff1c932b98037e21c8cbbd (diff) | |
| parent | e4a0b48027d3d800617f05b228f0f6dfa24f6627 (diff) | |
| download | rust-e0adabf0ee33ea40317f719c11ba39c7fc296c0e.tar.gz rust-e0adabf0ee33ea40317f719c11ba39c7fc296c0e.zip | |
Rollup merge of #29874 - steveklabnik:gh29711, r=alexcrichton
in their API docs Fixes #29711
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/clone.rs | 2 | ||||
| -rw-r--r-- | src/libcore/cmp.rs | 8 | ||||
| -rw-r--r-- | src/libcore/fmt/mod.rs | 2 | ||||
| -rw-r--r-- | src/libcore/hash/mod.rs | 2 | ||||
| -rw-r--r-- | src/libcore/marker.rs | 4 |
5 files changed, 18 insertions, 0 deletions
diff --git a/src/libcore/clone.rs b/src/libcore/clone.rs index 979ddd45412..769faedf46e 100644 --- a/src/libcore/clone.rs +++ b/src/libcore/clone.rs @@ -24,6 +24,8 @@ use marker::Sized; /// A common trait for cloning an object. +/// +/// This trait can be used with `#[derive]`. #[stable(feature = "rust1", since = "1.0.0")] pub trait Clone : Sized { /// Returns a copy of the value. diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index 5458a7b9c38..3ac4ffb2236 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -43,6 +43,8 @@ use option::Option::{self, Some}; /// in terms of it by default. Any manual implementation of `ne` *must* respect /// the rule that `eq` is a strict inverse of `ne`; that is, `!(a == b)` if and /// only if `a != b`. +/// +/// This trait can be used with `#[derive]`. #[lang = "eq"] #[stable(feature = "rust1", since = "1.0.0")] pub trait PartialEq<Rhs: ?Sized = Self> { @@ -69,6 +71,8 @@ pub trait PartialEq<Rhs: ?Sized = Self> { /// /// This property cannot be checked by the compiler, and therefore `Eq` implies /// `PartialEq`, and has no extra methods. +/// +/// This trait can be used with `#[derive]`. #[stable(feature = "rust1", since = "1.0.0")] pub trait Eq: PartialEq<Self> { // FIXME #13101: this method is used solely by #[deriving] to @@ -171,6 +175,8 @@ impl Ordering { /// - 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]`. #[stable(feature = "rust1", since = "1.0.0")] pub trait Ord: Eq + PartialOrd<Self> { /// This method returns an `Ordering` between `self` and `other`. @@ -227,6 +233,8 @@ impl PartialOrd for Ordering { /// However it remains possible to implement the others separately for types which do not have a /// 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]`. #[lang = "ord"] #[stable(feature = "rust1", since = "1.0.0")] pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> { diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index 8fe65e27c03..dfcc5781f08 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -300,6 +300,8 @@ impl<'a> Display for Arguments<'a> { /// /// [module]: ../../std/fmt/index.html /// +/// This trait can be used with `#[derive]`. +/// /// # Examples /// /// Deriving an implementation: diff --git a/src/libcore/hash/mod.rs b/src/libcore/hash/mod.rs index 0899dc28848..ea3a2f78d56 100644 --- a/src/libcore/hash/mod.rs +++ b/src/libcore/hash/mod.rs @@ -93,6 +93,8 @@ mod sip; /// /// In other words, if two keys are equal, their hashes should also be equal. /// `HashMap` and `HashSet` both rely on this behavior. +/// +/// This trait can be used with `#[derive]`. #[stable(feature = "rust1", since = "1.0.0")] pub trait Hash { /// Feeds this value into the state given, updating the hasher as necessary. diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index 6e6ae618527..84a6196cc87 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -165,6 +165,10 @@ pub trait Unsize<T: ?Sized> { /// to consider though: if you think your type may _not_ be able to implement `Copy` in the future, /// then it might be prudent to not implement `Copy`. This is because removing `Copy` is a breaking /// change: that second example would fail to compile if we made `Foo` non-`Copy`. +/// +/// # Derivable +/// +/// This trait can be used with `#[derive]`. #[stable(feature = "rust1", since = "1.0.0")] #[lang = "copy"] pub trait Copy : Clone { |
