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-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,7 @@ by ensuring that generated functions have names that are unlikely to clash with
80
80
other functions (like `__internal_foo` instead of `foo`).
81
81
82
82
<!-- TODO: rule name needs improvement -->
83
+
<!-- template:attributes -->
83
84
r[macro.proc.proc_macro]
84
85
## The `proc_macro` attribute
85
86
@@ -116,7 +117,7 @@ The *`proc_macro` [attribute][attributes]* defines a procedural macro for [funct
116
117
> ```
117
118
118
119
r[macro.proc.proc_macro.syntax]
119
-
The `proc_macro` attribute uses the [MetaWord] syntax and thus does not take any inputs.
120
+
The `proc_macro` attribute uses the [MetaWord] syntax.
120
121
121
122
r[macro.proc.proc_macro.allowed-positions]
122
123
The `proc_macro` attribute may only be applied to a function with the signature of `pub fn(TokenStream) -> TokenStream` where [`TokenStream`] comes from the [`proc_macro` crate]. It must have the ["Rust" ABI][items.fn.extern]. No other function qualifiers are allowed.
0 commit comments