Replace usage of deriving with derive in docs

This commit is contained in:
Greg Chapple 2015-01-06 10:56:14 +00:00
parent f1241f14dc
commit 4b14f67df3
3 changed files with 6 additions and 6 deletions

View file

@ -2432,15 +2432,15 @@ There are three different types of inline attributes:
* `#[inline(always)]` asks the compiler to always perform an inline expansion.
* `#[inline(never)]` asks the compiler to never perform an inline expansion.
### Deriving
### Derive
The `deriving` attribute allows certain traits to be automatically implemented
The `derive` attribute allows certain traits to be automatically implemented
for data structures. For example, the following will create an `impl` for the
`PartialEq` and `Clone` traits for `Foo`, the type parameter `T` will be given
the `PartialEq` or `Clone` constraints for the appropriate `impl`:
```
#[deriving(PartialEq, Clone)]
#[derive(PartialEq, Clone)]
struct Foo<T> {
a: int,
b: T
@ -2462,7 +2462,7 @@ impl<T: PartialEq> PartialEq for Foo<T> {
}
```
Supported traits for `deriving` are:
Supported traits for `derive` are:
* Comparison traits: `PartialEq`, `Eq`, `PartialOrd`, `Ord`.
* Serialization: `Encodable`, `Decodable`. These require `serialize`.