Add specific message for tuple struct invoked with suffixed numeric field name
This commit is contained in:
parent
1bb3694b1a
commit
8d1cc72cf9
3 changed files with 21 additions and 2 deletions
|
@ -2491,7 +2491,8 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
|
||||
fn parse_field_name(&mut self) -> PResult<'a, Ident> {
|
||||
if let token::Literal(token::Integer(name), None) = self.token {
|
||||
if let token::Literal(token::Integer(name), suffix) = self.token {
|
||||
self.expect_no_suffix(self.span, "a tuple index", suffix);
|
||||
self.bump();
|
||||
Ok(Ident::new(name, self.prev_span))
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue