Skip to content

Commit d17153c

Browse files
authored
Merge pull request #816 from ehuss/update-fn-proc-macro
Update fn-like proc-macro invocation restrictions.
2 parents becdca9 + 77c9d41 commit d17153c

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/procedural-macros.md

+8-10
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,10 @@ fn main() {
106106
}
107107
```
108108

109-
Function-like procedural macros may expand to a [type] or any number of
110-
[items], including [`macro_rules`] definitions. They may be invoked in a [type
111-
expression], [item] position (except as a [statement]), including items in
112-
[`extern` blocks], inherent and trait [implementations], and [trait
113-
definitions]. They cannot be used in a [statement], [expression], or
114-
[pattern].
109+
Function-like procedural macros may be invoked in any macro invocation
110+
position, which includes [statements], [expressions], [patterns], [type
111+
expressions], [item] positions, including items in [`extern` blocks], inherent
112+
and trait [implementations], and [trait definitions].
115113

116114
### Derive macros
117115

@@ -290,18 +288,18 @@ fn invoke4() {}
290288
[crate type]: linkage.md
291289
[derive macro helper attributes]: #derive-macro-helper-attributes
292290
[enum]: items/enumerations.md
293-
[expression]: expressions.md
291+
[expressions]: expressions.md
294292
[function]: items/functions.md
295293
[implementations]: items/implementations.md
296294
[inert]: attributes.md#active-and-inert-attributes
297295
[item]: items.md
298296
[items]: items.md
299297
[module]: items/modules.md
300-
[pattern]: patterns.md
298+
[patterns]: patterns.md
301299
[public]: visibility-and-privacy.md
302-
[statement]: statements.md
300+
[statements]: statements.md
303301
[struct]: items/structs.md
304302
[trait definitions]: items/traits.md
305-
[type expression]: types.md#type-expressions
303+
[type expressions]: types.md#type-expressions
306304
[type]: types.md
307305
[union]: items/unions.md

0 commit comments

Comments
 (0)