diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-05-14 00:01:56 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-05-15 23:54:08 +0300 |
| commit | c1061254317ac747d2bf5901329545f4cec5ebcb (patch) | |
| tree | 4abe39c1bf4c5db072c168ce019c195763e0920b /src/libsyntax/parse/lexer | |
| parent | 5b820a694c0fd8392092c3f0301537aafe92cce2 (diff) | |
| download | rust-c1061254317ac747d2bf5901329545f4cec5ebcb.tar.gz rust-c1061254317ac747d2bf5901329545f4cec5ebcb.zip | |
Represent lifetimes as two joint tokens in proc macros
Diffstat (limited to 'src/libsyntax/parse/lexer')
| -rw-r--r-- | src/libsyntax/parse/lexer/mod.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index 4da7b8e93d9..3e22598043a 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -1773,10 +1773,7 @@ fn ident_continue(c: Option<char>) -> bool { // The string is a valid identifier or a lifetime identifier. pub fn is_valid_ident(s: &str) -> bool { let mut chars = s.chars(); - match chars.next() { - Some('\'') => ident_start(chars.next()) && chars.all(|ch| ident_continue(Some(ch))), - ch => ident_start(ch) && chars.all(|ch| ident_continue(Some(ch))) - } + ident_start(chars.next()) && chars.all(|ch| ident_continue(Some(ch))) } #[cfg(test)] |
