File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,8 @@ The following is an index of all built-in attributes.
185
185
- [ ` should_panic ` ] — Indicates a test should generate a panic.
186
186
- Derive
187
187
- [ ` derive ` ] — Automatic trait implementations.
188
+ - [ ` automatically_derived ` ] — Marker for implementations created by
189
+ ` derive ` .
188
190
- Macros
189
191
- [ ` macro_export ` ] — Exports a ` macro_rules ` macro for cross-crate usage.
190
192
- [ ` macro_use ` ] — Expands macro visibility, or imports macros from other
@@ -250,6 +252,7 @@ The following is an index of all built-in attributes.
250
252
[ _LiteralExpression_ ] : expressions/literal-expr.html
251
253
[ _SimplePath_ ] : paths.html#simple-paths
252
254
[ `allow` ] : attributes/diagnostics.html#lint-check-attributes
255
+ [ `automatically_derived` ] : attributes/derive.html#the-automatically_derived-attribute
253
256
[ `cfg_attr` ] : conditional-compilation.html#the-cfg_attr-attribute
254
257
[ `cfg` ] : conditional-compilation.html#the-cfg-attribute
255
258
[ `cold` ] : attributes/codegen.html#the-cold-attribute
Original file line number Diff line number Diff line change @@ -33,10 +33,18 @@ impl<T: PartialEq> PartialEq for Foo<T> {
33
33
34
34
You can implement ` derive ` for your own traits through [ procedural macros] .
35
35
36
+ ## The ` automatically_derived ` attribute
37
+
38
+ The * ` automatically_derived ` attribute* is automatically added to
39
+ [ implementations] created by the ` derive ` attribute for built-in traits. It
40
+ has no direct effect, but it may be used by tools and diagnostic lints to
41
+ detect these automatically generated implementations.
42
+
36
43
[ _MetaListPaths_ ] : attributes.html#meta-item-attribute-syntax
37
44
[ `Clone` ] : ../std/clone/trait.Clone.html
38
45
[ `PartialEq` ] : ../std/cmp/trait.PartialEq.html
39
46
[ `impl` item ] : items/implementations.html
40
- [ items ] : items.html
41
47
[ derive macros ] : procedural-macros.html#derive-macros
48
+ [ implementations ] : items/implementations.html
49
+ [ items ] : items.html
42
50
[ procedural macros ] : procedural-macros.html#derive-macros
You can’t perform that action at this time.
0 commit comments