Skip to content

Commit 18580e2

Browse files
committed
Issue #50974: Fix compilation error and test
1 parent 8e956e1 commit 18580e2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ impl<'a> Parser<'a> {
767767
err.span_label(self.span, format!("expected identifier, found {}", token_descr));
768768
} else {
769769
err.span_label(self.span, "expected identifier");
770-
if self.token == token::Comma && self.look_ahead(1, |t| *t.is_ident()) {
770+
if self.token == token::Comma && self.look_ahead(1, |t| t.is_ident()) {
771771
err.span_suggestion(self.span, "remove this comma", "".into());
772772
}
773773
}

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

Lines changed: 1 addition & 1 deletion
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)