File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
parser/src/grammar/expressions
syntax/test_data/parser/err Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -448,10 +448,8 @@ fn match_arm(p: &mut Parser) {
448448 // _ => ()
449449 // }
450450 // }
451- if blocklike. is_block ( ) {
452- p. eat ( T ! [ , ] ) ;
453- } else if !p. at ( T ! [ '}' ] ) {
454- p. expect ( T ! [ , ] ) ;
451+ if !p. eat ( T ! [ , ] ) && !blocklike. is_block ( ) && !p. at ( T ! [ '}' ] ) {
452+ p. error ( "expected `,`" ) ;
455453 }
456454 m. complete ( p, MATCH_ARM ) ;
457455}
Original file line number Diff line number Diff line change @@ -194,11 +194,11 @@ SOURCE_FILE@0..293
194194error 52..52: expected `[`
195195error 52..52: expected pattern
196196error 53..53: expected FAT_ARROW
197- error 78..78: expected COMMA
197+ error 78..78: expected `,`
198198error 161..161: expected `[`
199199error 161..161: expected pattern
200200error 162..162: expected FAT_ARROW
201201error 232..232: expected `[`
202202error 232..232: expected pattern
203203error 233..233: expected FAT_ARROW
204- error 250..250: expected COMMA
204+ error 250..250: expected `,`
You can’t perform that action at this time.
0 commit comments