about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Mansi <markm@cs.wisc.edu>2018-01-26 17:26:09 -0600
committerMark Mansi <markm@cs.wisc.edu>2018-01-30 12:42:51 -0600
commit6943430e6d0ff11db4d99544cef7d480b15385e5 (patch)
tree86b5a24493882506921242ac71a08834a6b66d97
parentbd98a935587ad988b5780b75021b1a45d0f508d7 (diff)
downloadrust-6943430e6d0ff11db4d99544cef7d480b15385e5.tar.gz
rust-6943430e6d0ff11db4d99544cef7d480b15385e5.zip
Add ? to unstable book
-rw-r--r--src/doc/unstable-book/src/language-features/macro-at-most-once-rep.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/doc/unstable-book/src/language-features/macro-at-most-once-rep.md b/src/doc/unstable-book/src/language-features/macro-at-most-once-rep.md
new file mode 100644
index 00000000000..dbaf91b6e78
--- /dev/null
+++ b/src/doc/unstable-book/src/language-features/macro-at-most-once-rep.md
@@ -0,0 +1,17 @@
+# `macro_at_most_once_rep`
+
+The tracking issue for this feature is: TODO(mark-i-m)
+
+With this feature gate enabled, one can use `?` as a Kleene operator meaning "0
+or 1 repetitions" in a macro definition. Previously only `+` and `*` were allowed.
+
+For example:
+```rust
+macro_rules! foo {
+    (something $(,)?) // `?` indicates `,` is "optional"...
+        => {}
+}
+```
+
+------------------------
+