From 2d99e6de278bdd1f2b094c818a960734c9b7db0b Mon Sep 17 00:00:00 2001 From: kjeremy Date: Fri, 20 Sep 2019 12:03:25 -0400 Subject: Simplify match arm --- crates/ra_parser/src/grammar/patterns.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crates/ra_parser/src/grammar') diff --git a/crates/ra_parser/src/grammar/patterns.rs b/crates/ra_parser/src/grammar/patterns.rs index 877ae5b7a..aa9a6d18e 100644 --- a/crates/ra_parser/src/grammar/patterns.rs +++ b/crates/ra_parser/src/grammar/patterns.rs @@ -167,8 +167,7 @@ fn record_field_pat_list(p: &mut Parser) { // A trailing `..` is *not* treated as a DOT_DOT_PAT. T![.] if p.at(T![..]) => p.bump(T![..]), - IDENT if p.nth(1) == T![:] => record_field_pat(p), - INT_NUMBER if p.nth(1) == T![:] => record_field_pat(p), + IDENT | INT_NUMBER if p.nth(1) == T![:] => record_field_pat(p), T!['{'] => error_block(p, "expected ident"), T![box] => { box_pat(p); -- cgit v1.2.3