about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-01-01 07:21:23 +0000
committerbors <bors@rust-lang.org>2018-01-01 07:21:23 +0000
commit1bcc6dc7ea430b7d403a57f60e48b3c3cdfcf562 (patch)
tree2073115c9aa906116a5698340385e1aacfca21b4 /src/doc
parentf3ca88cff7dc397f409f561321ee3c4021c05436 (diff)
parent8b4bdc2f3f753e0d0b00ecc892a813e9786621e9 (diff)
downloadrust-1bcc6dc7ea430b7d403a57f60e48b3c3cdfcf562.tar.gz
rust-1bcc6dc7ea430b7d403a57f60e48b3c3cdfcf562.zip
Auto merge of #46895 - ricochet1k:macro-lifetimes, r=jseyfried
Allow lifetimes in macros

This is a resurrection of PR #41927 which was a resurrection of #33135, which is intended to fix #34303.

In short, this allows macros_rules! to use :lifetime as a matcher to match 'lifetimes.

Still to do:
- [x]  Feature gate
Diffstat (limited to 'src/doc')
-rw-r--r--src/doc/unstable-book/src/language-features/macro-lifetime-matcher.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/doc/unstable-book/src/language-features/macro-lifetime-matcher.md b/src/doc/unstable-book/src/language-features/macro-lifetime-matcher.md
new file mode 100644
index 00000000000..5b585d7f041
--- /dev/null
+++ b/src/doc/unstable-book/src/language-features/macro-lifetime-matcher.md
@@ -0,0 +1,14 @@
+# `macro_lifetime_matcher`
+
+The tracking issue for this feature is: [#46895]
+
+With this feature gate enabled, the [list of fragment specifiers][frags] gains one more entry:
+
+* `lifetime`: a lifetime. Examples: 'static, 'a.
+
+A `lifetime` variable may be followed by anything.
+
+[#46895]: https://github.com/rust-lang/rust/issues/46895
+[frags]: ../book/first-edition/macros.html#syntactic-requirements
+
+------------------------