diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-06-05 13:04:15 -0400 |
|---|---|---|
| committer | Pietro Albini <pietro@pietroalbini.org> | 2018-06-22 11:38:38 +0200 |
| commit | a99767f64f400f694aec02655af4b5cb5913609e (patch) | |
| tree | 827d8c13d92996fae737ffa364cdbbb4519d7a05 /src/libsyntax/parse/parser.rs | |
| parent | 815765dadeb011180ad3ea0ce02c9cc59f8c93cc (diff) | |
| download | rust-a99767f64f400f694aec02655af4b5cb5913609e.tar.gz rust-a99767f64f400f694aec02655af4b5cb5913609e.zip | |
add an explanatory comment for recovery behavior
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 456054ee251..dfd896fbda4 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2450,6 +2450,9 @@ impl<'a> Parser<'a> { e.span_label(struct_sp, "while parsing this struct"); e.emit(); + // If the next token is a comma, then try to parse + // what comes next as additional fields, rather than + // bailing out until next `}`. if self.token != token::Comma { self.recover_stmt(); break; |
