File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff 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
24382438for 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
24402440the ` PartialEq ` or ` Clone ` constraints for the appropriate ` impl ` :
24412441
24422442```
2443- #[deriving (PartialEq, Clone)]
2443+ #[derive (PartialEq, Clone)]
24442444struct 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 ` .
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ Rustdoc also supplies some extra sugar for helping with some tedious
198198documentation examples. If a line is prefixed with ` # ` , then the line
199199will not show up in the HTML documentation, but it will be used when
200200testing 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```
Original file line number Diff line number Diff 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
128128In 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
130130extensions. See
131131[ ` Registry::register_syntax_extension ` ] ( ../rustc/plugin/registry/struct.Registry.html#method.register_syntax_extension )
132132and the [ ` SyntaxExtension `
You can’t perform that action at this time.
0 commit comments