Skip to content

Commit e22e1c8

Browse files
committed
Unwrap proc_macro
1 parent 52ce896 commit e22e1c8

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

src/procedural-macros.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,15 @@ r[macro.proc.function]
8383
## Function-like procedural macros
8484
8585
r[macro.proc.function.intro]
86-
*Function-like procedural macros* are procedural macros that are invoked using
87-
the macro invocation operator (`!`).
86+
*Function-like procedural macros* are procedural macros that are invoked using the macro invocation operator (`!`).
8887
8988
r[macro.proc.function.def]
90-
These macros are defined by a [public] [function] with the `proc_macro`
91-
[attribute] and a signature of `(TokenStream) -> TokenStream`. The input
92-
[`TokenStream`] is what is inside the delimiters of the macro invocation and the
93-
output [`TokenStream`] replaces the entire macro invocation.
89+
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.
9490
9591
r[macro.proc.function.namespace]
9692
The `proc_macro` attribute defines the macro in the [macro namespace] in the root of the crate.
9793
98-
For example, the following macro definition ignores its input and outputs a
99-
function `answer` into its scope.
94+
For example, the following macro definition ignores its input and outputs a function `answer` into its scope.
10095
10196
<!-- ignore: test doesn't support proc-macro -->
10297
```rust,ignore
@@ -125,10 +120,7 @@ fn main() {
125120
```
126121

127122
r[macro.proc.function.invocation]
128-
Function-like procedural macros may be invoked in any macro invocation
129-
position, which includes [statements], [expressions], [patterns], [type
130-
expressions], [item] positions, including items in [`extern` blocks], inherent
131-
and trait [implementations], and [trait definitions].
123+
Function-like procedural macros may be invoked in any macro invocation position, which includes [statements], [expressions], [patterns], [type expressions], [item] positions, including items in [`extern` blocks], inherent and trait [implementations], and [trait definitions].
132124

133125
<!-- template:attributes -->
134126
r[macro.proc.derive]

0 commit comments

Comments
 (0)