Simplify match arm

This commit is contained in:
kjeremy 2019-09-20 12:03:25 -04:00
parent 3575f7c4a2
commit 2d99e6de27

View file

@ -167,8 +167,7 @@ fn record_field_pat_list(p: &mut Parser) {
// A trailing `..` is *not* treated as a DOT_DOT_PAT. // A trailing `..` is *not* treated as a DOT_DOT_PAT.
T![.] if p.at(T![..]) => p.bump(T![..]), T![.] if p.at(T![..]) => p.bump(T![..]),
IDENT if p.nth(1) == T![:] => record_field_pat(p), IDENT | INT_NUMBER if p.nth(1) == T![:] => record_field_pat(p),
INT_NUMBER if p.nth(1) == T![:] => record_field_pat(p),
T!['{'] => error_block(p, "expected ident"), T!['{'] => error_block(p, "expected ident"),
T![box] => { T![box] => {
box_pat(p); box_pat(p);