1
Fork 0

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

View file

@ -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