diff options
| author | Greg Chapple <gregchapple1@gmail.com> | 2015-01-06 10:56:14 +0000 |
|---|---|---|
| committer | Greg Chapple <gregchapple1@gmail.com> | 2015-01-13 13:57:09 +0000 |
| commit | 4b14f67df3c28cd1cd8ea5bf794a3e542c663d8d (patch) | |
| tree | 6dca535c770cb8b7441717e7c75c0a13e69ae672 /src/doc | |
| parent | f1241f14dc8f5e708e258a46950e8c7635efe6c7 (diff) | |
| download | rust-4b14f67df3c28cd1cd8ea5bf794a3e542c663d8d.tar.gz rust-4b14f67df3c28cd1cd8ea5bf794a3e542c663d8d.zip | |
Replace usage of deriving with derive in docs
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/reference.md | 8 | ||||
| -rw-r--r-- | src/doc/rustdoc.md | 2 | ||||
| -rw-r--r-- | src/doc/trpl/plugins.md | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md index 623097b2fc9..db45633b884 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -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`. diff --git a/src/doc/rustdoc.md b/src/doc/rustdoc.md index 054552559db..aba13d31989 100644 --- a/src/doc/rustdoc.md +++ b/src/doc/rustdoc.md @@ -198,7 +198,7 @@ Rustdoc also supplies some extra sugar for helping with some tedious documentation examples. If a line is prefixed with `# `, then the line will not show up in the HTML documentation, but it will be used when testing the code block (NB. the space after the `#` is required, so -that one can still write things like `#[deriving(Eq)]`). +that one can still write things like `#[derive(Eq)]`). ~~~md ``` diff --git a/src/doc/trpl/plugins.md b/src/doc/trpl/plugins.md index 2fc361ca1b2..4cd39d407a2 100644 --- a/src/doc/trpl/plugins.md +++ b/src/doc/trpl/plugins.md @@ -126,7 +126,7 @@ The advantages over a simple `fn(&str) -> uint` are: a way to define new literal syntax for any data type. In addition to procedural macros, you can define new -[`deriving`](../reference.html#deriving)-like attributes and other kinds of +[`derive`](../reference.html#derive)-like attributes and other kinds of extensions. See [`Registry::register_syntax_extension`](../rustc/plugin/registry/struct.Registry.html#method.register_syntax_extension) and the [`SyntaxExtension` |
