This commit is contained in:
Lukas Wirth 2021-07-30 13:12:52 +02:00
parent 836784f02b
commit f04cff102f
2 changed files with 4 additions and 6 deletions

View file

@ -448,10 +448,8 @@ fn match_arm(p: &mut Parser) {
// _ => ()
// }
// }
if blocklike.is_block() {
p.eat(T![,]);
} else if !p.at(T!['}']) {
p.expect(T![,]);
if !p.eat(T![,]) && !blocklike.is_block() && !p.at(T!['}']) {
p.error("expected `,`");
}
m.complete(p, MATCH_ARM);
}

View file

@ -194,11 +194,11 @@ SOURCE_FILE@0..293
error 52..52: expected `[`
error 52..52: expected pattern
error 53..53: expected FAT_ARROW
error 78..78: expected COMMA
error 78..78: expected `,`
error 161..161: expected `[`
error 161..161: expected pattern
error 162..162: expected FAT_ARROW
error 232..232: expected `[`
error 232..232: expected pattern
error 233..233: expected FAT_ARROW
error 250..250: expected COMMA
error 250..250: expected `,`