Represent lifetimes as two joint tokens in proc macros
This commit is contained in:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user