@@ -70,17 +70,16 @@ If a derive macro mistakenly emits the token stream it was applied to
70
70
the duplicate item should hint to the user that the macro was defined
71
71
incorrectly, and remind the user that derive macros only append new items.
72
72
73
- A ` derive() ` rule can be marked as ` unsafe ` : `unsafe derive() (...)
74
- => { ... }`. Invoking such a derive using a rule marked as unsafe
75
- requires unsafe derive syntax: either
76
- ` #[unsafe(derive(DangerousTrait))] ` or
77
- ` #[derive(unsafe(DangerousTrait))] ` . (The latter syntax allows
78
- isolating the ` unsafe ` to a single derive within a list of
79
- derives.) Invoking an unsafe derive rule without the unsafe derive
80
- syntax will produce a compiler error. Using the unsafe derive
81
- syntax without an unsafe derive will trigger an "unused unsafe"
82
- lint. (RFC 3715 defines the equivalent mechanism for proc macro
83
- derives.)
73
+ A ` derive() ` rule can be marked as ` unsafe ` :
74
+ ` unsafe derive() (...) => { ... } ` .
75
+ Invoking such a derive using a rule marked as ` unsafe `
76
+ requires ` unsafe ` derive syntax:
77
+ ` #[derive(unsafe(DangerousDeriveMacro))] `
78
+
79
+ Invoking an unsafe derive rule without the unsafe derive syntax will produce a
80
+ compiler error. Using the unsafe derive syntax without an unsafe derive will
81
+ trigger an "unused unsafe" lint. (RFC 3715 defines the equivalent mechanism for
82
+ proc macro derives.)
84
83
85
84
# Reference-level explanation
86
85
[ reference-level-explanation ] : #reference-level-explanation
0 commit comments