Skip to content

Commit a99767f

Browse files
nikomatsakispietroalbini
authored andcommitted
add an explanatory comment for recovery behavior
1 parent 815765d commit a99767f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libsyntax/parse/parser.rs

+3
Original file line numberDiff line numberDiff line change
@@ -2450,6 +2450,9 @@ impl<'a> Parser<'a> {
24502450
e.span_label(struct_sp, "while parsing this struct");
24512451
e.emit();
24522452

2453+
// If the next token is a comma, then try to parse
2454+
// what comes next as additional fields, rather than
2455+
// bailing out until next `}`.
24532456
if self.token != token::Comma {
24542457
self.recover_stmt();
24552458
break;

0 commit comments

Comments
 (0)