Issue #50974: Fix compilation error and test
This commit is contained in:
parent
fadb86f25d
commit
815765dade
@ -776,7 +776,7 @@ impl<'a> Parser<'a> {
|
||||
err.span_label(self.span, format!("expected identifier, found {}", token_descr));
|
||||
} else {
|
||||
err.span_label(self.span, "expected identifier");
|
||||
if self.token == token::Comma && self.look_ahead(1, |t| *t.is_ident()) {
|
||||
if self.token == token::Comma && self.look_ahead(1, |t| t.is_ident()) {
|
||||
err.span_suggestion(self.span, "remove this comma", "".into());
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ LL | a: 0,,
|
||||
| ^
|
||||
| |
|
||||
| expected identifier
|
||||
| help: remove this comma: `,`
|
||||
| help: remove this comma
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user