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);
}