Skip to content

Commit 1902ae4

Browse files
authored
Merge pull request #694 from ehuss/proc-macro-macro_rules
Update now that proc macros can expand to macro_rules.
2 parents 2865944 + 56d4aa1 commit 1902ae4

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/procedural-macros.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ fn main() {
104104
```
105105

106106
Function-like procedural macros may expand to a [type] or any number of
107-
[items]. They may be invoked in a [type expression], [item] position (except
108-
as a [statement]), including items in [`extern` blocks], inherent and trait
109-
[implementations], and [trait definitions]. They cannot be used in a
110-
[statement], [expression], or [pattern]. These macros cannot expand to syntax
111-
that defines new [`macro_rules`] style macros.
107+
[items], including [`macro_rules`] definitions. They may be invoked in a [type
108+
expression], [item] position (except as a [statement]), including items in
109+
[`extern` blocks], inherent and trait [implementations], and [trait
110+
definitions]. They cannot be used in a [statement], [expression], or
111+
[pattern].
112112

113113
### Derive macros
114114

@@ -202,8 +202,7 @@ tree following the attribute's name, not including the outer delimiters. If
202202
the attribute is written as a bare attribute name, the attribute
203203
[`TokenStream`] is empty. The second [`TokenStream`] is the rest of the [item]
204204
including other [attributes] on the [item]. The returned [`TokenStream`]
205-
replaces the [item] with an arbitrary number of [items]. These macros cannot
206-
expand to syntax that defines new [`macro_rules`] style macros.
205+
replaces the [item] with an arbitrary number of [items].
207206

208207
For example, this attribute macro takes the input stream and returns it as is,
209208
effectively being the no-op of attributes.

0 commit comments

Comments
 (0)