Skip to content

Commit 21b2505

Browse files
committed
Merge pull request #20632 from gchp/reference
Replace usage of deriving with derive in docs Reviewed-by: steveklabnik
2 parents bdbcdae + 4b14f67 commit 21b2505

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/doc/reference.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2432,15 +2432,15 @@ There are three different types of inline attributes:
24322432
* `#[inline(always)]` asks the compiler to always perform an inline expansion.
24332433
* `#[inline(never)]` asks the compiler to never perform an inline expansion.
24342434

2435-
### Deriving
2435+
### Derive
24362436

2437-
The `deriving` attribute allows certain traits to be automatically implemented
2437+
The `derive` attribute allows certain traits to be automatically implemented
24382438
for data structures. For example, the following will create an `impl` for the
24392439
`PartialEq` and `Clone` traits for `Foo`, the type parameter `T` will be given
24402440
the `PartialEq` or `Clone` constraints for the appropriate `impl`:
24412441

24422442
```
2443-
#[deriving(PartialEq, Clone)]
2443+
#[derive(PartialEq, Clone)]
24442444
struct Foo<T> {
24452445
a: int,
24462446
b: T
@@ -2462,7 +2462,7 @@ impl<T: PartialEq> PartialEq for Foo<T> {
24622462
}
24632463
```
24642464

2465-
Supported traits for `deriving` are:
2465+
Supported traits for `derive` are:
24662466

24672467
* Comparison traits: `PartialEq`, `Eq`, `PartialOrd`, `Ord`.
24682468
* Serialization: `Encodable`, `Decodable`. These require `serialize`.

src/doc/rustdoc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ Rustdoc also supplies some extra sugar for helping with some tedious
198198
documentation examples. If a line is prefixed with `# `, then the line
199199
will not show up in the HTML documentation, but it will be used when
200200
testing the code block (NB. the space after the `#` is required, so
201-
that one can still write things like `#[deriving(Eq)]`).
201+
that one can still write things like `#[derive(Eq)]`).
202202

203203
~~~md
204204
```

src/doc/trpl/plugins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ The advantages over a simple `fn(&str) -> uint` are:
126126
a way to define new literal syntax for any data type.
127127

128128
In addition to procedural macros, you can define new
129-
[`deriving`](../reference.html#deriving)-like attributes and other kinds of
129+
[`derive`](../reference.html#derive)-like attributes and other kinds of
130130
extensions. See
131131
[`Registry::register_syntax_extension`](../rustc/plugin/registry/struct.Registry.html#method.register_syntax_extension)
132132
and the [`SyntaxExtension`

0 commit comments

Comments
 (0)