comment feedback
This commit is contained in:
parent
9db8e183dc
commit
ff18c73065
1 changed files with 1 additions and 2 deletions
|
@ -362,8 +362,7 @@ impl<'a> Parser<'a> {
|
||||||
let Err(_) = rustc_ast::Lit::from_token(&self.token) &&
|
let Err(_) = rustc_ast::Lit::from_token(&self.token) &&
|
||||||
(lit.kind == token::LitKind::Integer || lit.kind == token::LitKind::Float) &&
|
(lit.kind == token::LitKind::Integer || lit.kind == token::LitKind::Float) &&
|
||||||
self.look_ahead(1, |t| matches!(t.kind, token::Eq) || matches!(t.kind, token::Colon ) ) {
|
self.look_ahead(1, |t| matches!(t.kind, token::Eq) || matches!(t.kind, token::Colon ) ) {
|
||||||
let err = self.sess.create_err(InvalidIdentiferStartsWithNumber { span: self.token.span });
|
return Err(self.sess.create_err(InvalidIdentiferStartsWithNumber { span: self.token.span }));
|
||||||
return Err(err);
|
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue