Skip to content

Commit 08d9205

Browse files
committed
Rename and reword proc_macro namespace rule
This is a slight rewording to clarify that the name of the function is what is inserted in the root.
1 parent f8ca506 commit 08d9205

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/procedural-macros.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ The *`proc_macro` [attribute][attributes]* defines a procedural macro for [funct
8989
r[macro.proc.function.def]
9090
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.
9191
92-
r[macro.proc.function.namespace]
93-
The `proc_macro` attribute defines the macro in the [macro namespace] in the root of the crate.
9492
9593
> [!EXAMPLE]
9694
> 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
124122
125123
126124
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.
127127
128128
129129
r[macro.proc.function.invocation]

0 commit comments

Comments
 (0)