Skip to content

Commit 815765d

Browse files
lambtowolfpietroalbini
authored andcommitted
Issue #50974: Fix compilation error and test
1 parent fadb86f commit 815765d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/libsyntax/parse/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ impl<'a> Parser<'a> {
776776
err.span_label(self.span, format!("expected identifier, found {}", token_descr));
777777
} else {
778778
err.span_label(self.span, "expected identifier");
779-
if self.token == token::Comma && self.look_ahead(1, |t| *t.is_ident()) {
779+
if self.token == token::Comma && self.look_ahead(1, |t| t.is_ident()) {
780780
err.span_suggestion(self.span, "remove this comma", "".into());
781781
}
782782
}

src/test/ui/struct-duplicate-comma.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | a: 0,,
77
| ^
88
| |
99
| expected identifier
10-
| help: remove this comma: `,`
10+
| help: remove this comma
1111

1212
error: aborting due to previous error
1313

0 commit comments

Comments
 (0)