We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd98a93 commit 6943430Copy full SHA for 6943430
src/doc/unstable-book/src/language-features/macro-at-most-once-rep.md
@@ -0,0 +1,17 @@
1
+# `macro_at_most_once_rep`
2
+
3
+The tracking issue for this feature is: TODO(mark-i-m)
4
5
+With this feature gate enabled, one can use `?` as a Kleene operator meaning "0
6
+or 1 repetitions" in a macro definition. Previously only `+` and `*` were allowed.
7
8
+For example:
9
+```rust
10
+macro_rules! foo {
11
+ (something $(,)?) // `?` indicates `,` is "optional"...
12
+ => {}
13
+}
14
+```
15
16
+------------------------
17
0 commit comments