File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,8 @@ The following is an index of all built-in attributes.
187
187
- [ ` should_panic ` ] — Indicates a test should generate a panic.
188
188
- Derive
189
189
- [ ` derive ` ] — Automatic trait implementations.
190
+ - [ ` automatically_derived ` ] — Marker for implementations created by
191
+ ` derive ` .
190
192
- Macros
191
193
- [ ` macro_export ` ] — Exports a ` macro_rules ` macro for cross-crate usage.
192
194
- [ ` macro_use ` ] — Expands macro visibility, or imports macros from other
@@ -255,6 +257,7 @@ The following is an index of all built-in attributes.
255
257
[ _LiteralExpression_ ] : expressions/literal-expr.md
256
258
[ _SimplePath_ ] : paths.md#simple-paths
257
259
[ `allow` ] : attributes/diagnostics.md#lint-check-attributes
260
+ [ `automatically_derived` ] : attributes/derive.md#the-automatically_derived-attribute
258
261
[ `cfg_attr` ] : conditional-compilation.md#the-cfg_attr-attribute
259
262
[ `cfg` ] : conditional-compilation.md#the-cfg-attribute
260
263
[ `cold` ] : attributes/codegen.md#the-cold-attribute
Original file line number Diff line number Diff line change @@ -33,10 +33,19 @@ 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.md#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.md
40
47
[ items ] : ../items.md
41
48
[ derive macros ] : ../procedural-macros.md#derive-macros
49
+ [ implementations ] : ../items/implementations.md
50
+ [ items ] : ../items.md
42
51
[ procedural macros ] : ../procedural-macros.md#derive-macros
You can’t perform that action at this time.
0 commit comments