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
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,8 +89,6 @@ The *`proc_macro` [attribute][attributes]* defines a procedural macro for [funct
89
89
r[macro.proc.function.def]
90
90
These macros are defined by a [public] [function] with the `proc_macro` [attribute] and a signature of `(TokenStream) -> TokenStream`. The input [`TokenStream`] is what is inside the delimiters of the macro invocation and the output [`TokenStream`] replaces the entire macro invocation.
91
91
92
-
r[macro.proc.function.namespace]
93
-
The `proc_macro` attribute defines the macro in the [macro namespace] in the root of the crate.
94
92
95
93
> [!EXAMPLE]
96
94
> The following macro definition ignores its input and outputs a function `answer` into its scope.
@@ -124,6 +122,8 @@ The `proc_macro` attribute defines the macro in the [macro namespace] in the roo
124
122
125
123
126
124
125
+
r[macro.proc.function.namespace]
126
+
The `proc_macro` attribute publicly defines the macro in the [macro namespace] in the root of the crate with the same name as the function.
0 commit comments