From 987020846ce40ce479df3d62adc47ca4609a5317 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 10 Jun 2018 14:26:26 -0700 Subject: Enable fall through past $:lifetime matcher --- src/libsyntax/ext/tt/macro_parser.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/libsyntax') 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, -- cgit 1.4.1-3-g733a5