Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace usage of deriving with derive in docs #20632

Merged
merged 1 commit into from
Jan 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down