Add ? to unstable book

This commit is contained in:
Mark Mansi 2018-01-26 17:26:09 -06:00
parent bd98a93558
commit 6943430e6d

View File

@ -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"...
=> {}
}
```
------------------------