Fix bug for ident to lifetime
This commit is contained in:
parent
87ff908135
commit
763569017a
@ -134,6 +134,13 @@ pub(crate) fn eat_item(&mut self) -> Option<tt::TokenTree> {
|
||||
}
|
||||
|
||||
pub(crate) fn eat_lifetime(&mut self) -> Option<tt::TokenTree> {
|
||||
// check if it start from "`"
|
||||
if let Some(ident) = self.at_ident() {
|
||||
if ident.text.chars().next()? != '\'' {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
|
||||
self.eat_ident().cloned().map(|ident| tt::Leaf::from(ident).into())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user