Issue #50974: Fix compilation error and test
This commit is contained in:
parent
fadb86f25d
commit
815765dade
2 changed files with 2 additions and 2 deletions
|
@ -776,7 +776,7 @@ impl<'a> Parser<'a> {
|
||||||
err.span_label(self.span, format!("expected identifier, found {}", token_descr));
|
err.span_label(self.span, format!("expected identifier, found {}", token_descr));
|
||||||
} else {
|
} else {
|
||||||
err.span_label(self.span, "expected identifier");
|
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());
|
err.span_suggestion(self.span, "remove this comma", "".into());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ LL | a: 0,,
|
||||||
| ^
|
| ^
|
||||||
| |
|
| |
|
||||||
| expected identifier
|
| expected identifier
|
||||||
| help: remove this comma: `,`
|
| help: remove this comma
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue