Skip to content

Commit 94a041f

Browse files
committed
Clarify that the macro_rules! pat behaviour depends on the macro definition's edition
1 parent efc2cf3 commit 94a041f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/macros-by-example.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ transcribed more than once or not at all.
143143
> **Edition Differences**: Starting with the 2021 edition, `pat` fragment-specifiers match top-level or-patterns (that is, they accept [_Pattern_]).
144144
>
145145
> Before the 2021 edition, they match exactly the same fragments as `pat_param` (that is, they accept [_PatternNoTopAlt_]).
146+
>
147+
> The relevant edition is the one in effect for the `macro_rules!` definition.
146148
147149
## Repetitions
148150

0 commit comments

Comments
 (0)