@@ -67,40 +67,42 @@ r[attributes.derive.automatically_derived]
6767## The `automatically_derived ` attribute
6868
6969r [attributes . derive. automatically_derived. intro]
70- The * `automatically_derived ` [attribute ][attributes ]* is used to annotate an [implementation ] to indicate that it was automatically created by a ` derive ` attribute . It has no direct effect , but it may be used by tools and diagnostic lints to detect these automatically generated implementations .
70+ The * `automatically_derived ` [attribute ][attributes ]* is used to annotate an [implementation ] to indicate that it was automatically created by a [ derive macro ] . It has no direct effect , but it may be used by tools and diagnostic lints to detect these automatically generated implementations .
7171
7272> [! EXAMPLE ]
73- > The following is an example of what the [`Clone `] derive may generate for a struct named `Example `.
73+ > Given [`#[derive(Clone )]`][macro @ Clone ] on `struct Example `, the [derive macro ] may produce :
74+ >
7475> ```rust
7576> # struct Example ;
7677> #[automatically_derived]
7778> impl :: core :: clone :: Clone for Example {
7879> #[inline]
79- > fn clone (& self ) -> Example {
80+ > fn clone (& self ) -> Self {
8081> Example
8182> }
8283> }
8384> ```
8485
8586r [attributes . derive. automatically_derived. syntax]
86- The `automatically_derived ` attribute uses the [MetaWord ] syntax and thus does not take any inputs .
87+ The `automatically_derived ` attribute uses the [MetaWord ] syntax and so does not accept any arguments .
8788
8889r [attributes . derive. automatically_derived. allowed- positions ]
8990The `automatically_derived ` attribute may be placed on an [implementation ].
9091
9192> [! NOTE ]
92- > `rustc ` currently warns in other positions .
93+ > `rustc ` currently accepts the attribute in other positions but lints against it .
9394
9495r [attributes . derive. automatically_derived. duplicates]
9596Duplicate instances of the `automatically_derived ` attribute on the same implementation have no effect .
9697
9798> [! NOTE ]
98- > `rustc ` currently warns on subsequent duplicate ` automatically_derived ` attributes .
99+ > `rustc ` lints against duplicate use of this attribute .
99100
100101r[attributes. derive. automatically_derived. behavior]
101102The `automatically_derived` attribute has no behavior.
102103
103104[items]: .. / items. md
105+ [derive macro ]: macro . proc. derive
104106[derive macros]: .. / procedural- macros. md#derive- macros
105107[implementation]: .. / items/ implementations. md
106108[items]: .. / items. md
0 commit comments