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) {
448
448
// _ => ()
449
449
// }
450
450
// }
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 `,`" ) ;
455
453
}
456
454
m. complete ( p, MATCH_ARM ) ;
457
455
}
Original file line number Diff line number Diff line change @@ -194,11 +194,11 @@ SOURCE_FILE@0..293
194
194
error 52..52: expected `[`
195
195
error 52..52: expected pattern
196
196
error 53..53: expected FAT_ARROW
197
- error 78..78: expected COMMA
197
+ error 78..78: expected `,`
198
198
error 161..161: expected `[`
199
199
error 161..161: expected pattern
200
200
error 162..162: expected FAT_ARROW
201
201
error 232..232: expected `[`
202
202
error 232..232: expected pattern
203
203
error 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