You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/procedural-macros.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,11 +166,6 @@ The *`proc_macro_derive` [attribute][attributes]* defines a *derive macro* which
166
166
> }
167
167
> ```
168
168
169
-
r[macro.proc.derive.namespace]
170
-
The `proc_macro_derive` attribute defines the custom derive in the [macro namespace] in the root of the crate.
171
-
172
-
r[macro.proc.derive.output]
173
-
The input [`TokenStream`] is the token stream of the item that has the `derive` attribute on it. The output [`TokenStream`] must be a set of items that are then appended to the [module] or [block] that the item from the input [`TokenStream`] is in.
174
169
r[macro.proc.derive.syntax]
175
170
The `proc_macro_derive` attribute uses the following syntax:
176
171
@@ -192,6 +187,11 @@ The `proc_macro_derive` attribute may only be applied to a function with the sig
192
187
r[macro.proc.derive.duplicates]
193
188
The `proc_macro_derive` attribute may only be specified once on a function.
194
189
190
+
r[macro.proc.derive.namespace]
191
+
The `proc_macro_derive` attribute publicly defines the custom derive in the [macro namespace] in the root of the crate with the name given in the attribute.
192
+
193
+
r[macro.proc.derive.output]
194
+
The input [`TokenStream`] is the token stream of the item that has the `derive` attribute on it. The output [`TokenStream`] must be a set of items that are then appended to the [module] or [block] that the item from the input [`TokenStream`] is in.
0 commit comments