1
Fork 0

Enable fall through past $:lifetime matcher

This commit is contained in:
David Tolnay 2018-06-10 14:26:26 -07:00
parent cabb679bf1
commit 987020846c
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
3 changed files with 52 additions and 1 deletions

View file

@ -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,