Closed
Description
The section on function-like procedural macros says (emphasis mine):
Function-like procedural macros may expand to a type or any number of items, including macro_rules definitions. They may be invoked in a type expression, item position (except as a statement), including items in extern blocks, inherent and trait implementations, and trait definitions. They cannot be used in a statement, expression, or pattern.
However, as of Rust 1.45, function-like procedural macros can be used in statement, expression, and pattern positions. (It was introduced in rust-lang/rust#68717.)
Metadata
Metadata
Assignees
Labels
No labels