about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2018-06-10 14:26:26 -0700
committerDavid Tolnay <dtolnay@gmail.com>2018-06-10 14:39:16 -0700
commit987020846ce40ce479df3d62adc47ca4609a5317 (patch)
tree8acd890463cb09437699466adb50dac319ebc20c /src/libsyntax
parentcabb679bf1bf37d34b0de3d60f655cf5e4185db6 (diff)
downloadrust-987020846ce40ce479df3d62adc47ca4609a5317.tar.gz
rust-987020846ce40ce479df3d62adc47ca4609a5317.zip
Enable fall through past $:lifetime matcher
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/tt/macro_parser.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs
index b53d94db27e..fe458fa9977 100644
--- a/src/libsyntax/ext/tt/macro_parser.rs
+++ b/src/libsyntax/ext/tt/macro_parser.rs
@@ -827,6 +827,14 @@ fn may_begin_with(name: &str, token: &Token) -> bool {
             Token::Interpolated(ref nt) => may_be_ident(&nt.0),
             _ => false,
         },
+        "lifetime" => match *token {
+            Token::Lifetime(_) => true,
+            Token::Interpolated(ref nt) => match nt.0 {
+                token::NtLifetime(_) | token::NtTT(_) => true,
+                _ => false,
+            },
+            _ => false,
+        },
         _ => match *token {
             token::CloseDelim(_) => false,
             _ => true,