Skip to content

Commit e43905e

Browse files
committed
Document that an attribute macro may invoke another, or itself
1 parent 27efc29 commit e43905e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

text/3697-declarative-attribute-macros.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ invocations can only match the `attr` rules, and non-attribute invocations can
5656
only match the non-`attr` rules. This allows adding `attr` rules to an existing
5757
macro without breaking backwards compatibility.
5858

59-
For simplicity, no special syntax is given to allow an attribute macro to
60-
recursively invoke its `attr` rules; to recurse, invoke a non-`attr` rule or
61-
another macro.
59+
An attribute macro may emit code containing another attribute, including one
60+
provided by an attribute macro. An attribute macro may use this to recursively
61+
invoke itself.
6262

6363
An `attr` rule may be prefixed with `unsafe`. Invoking an attribute macro in a
6464
way that makes use of a rule declared with `unsafe attr` requires the unsafe

0 commit comments

Comments
 (0)