parser: move parse_ident_or_underscore into item.rs

This commit is contained in:
Mazdak Farrokhzad 2019-08-11 20:00:38 +02:00
parent 3dbfbafe3e
commit 848ec4aa3c
2 changed files with 11 additions and 11 deletions

View file

@ -1079,17 +1079,6 @@ impl<'a> Parser<'a> {
})
}
fn parse_ident_or_underscore(&mut self) -> PResult<'a, ast::Ident> {
match self.token.kind {
token::Ident(name, false) if name == kw::Underscore => {
let span = self.token.span;
self.bump();
Ok(Ident::new(name, span))
}
_ => self.parse_ident(),
}
}
crate fn check_lifetime(&mut self) -> bool {
self.expected_tokens.push(TokenType::Lifetime);
self.token.is_lifetime()