Issue #50974: Fix compilation error and test

This commit is contained in:
Lamb 2018-05-30 13:06:05 +02:00 committed by Pietro Albini
parent fadb86f25d
commit 815765dade
No known key found for this signature in database
GPG Key ID: E8C1042DD1624519
2 changed files with 2 additions and 2 deletions

View File

@ -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());
}
}

View File

@ -7,7 +7,7 @@ LL | a: 0,,
| ^
| |
| expected identifier
| help: remove this comma: `,`
| help: remove this comma
error: aborting due to previous error