diff options
Diffstat (limited to 'crates/ra_syntax/src/grammar/patterns.rs')
-rw-r--r-- | crates/ra_syntax/src/grammar/patterns.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_syntax/src/grammar/patterns.rs b/crates/ra_syntax/src/grammar/patterns.rs index 925eabe1b..1ac5efdf6 100644 --- a/crates/ra_syntax/src/grammar/patterns.rs +++ b/crates/ra_syntax/src/grammar/patterns.rs | |||
@@ -37,7 +37,7 @@ fn atom_pat(p: &mut Parser, recovery_set: TokenSet) -> Option<CompletedMarker> { | |||
37 | let la1 = p.nth(1); | 37 | let la1 = p.nth(1); |
38 | if la0 == REF_KW | 38 | if la0 == REF_KW |
39 | || la0 == MUT_KW | 39 | || la0 == MUT_KW |
40 | || (la0.is_ident() && !(la1 == COLONCOLON || la1 == L_PAREN || la1 == L_CURLY)) | 40 | || (la0 == IDENT && !(la1 == COLONCOLON || la1 == L_PAREN || la1 == L_CURLY)) |
41 | { | 41 | { |
42 | return Some(bind_pat(p, true)); | 42 | return Some(bind_pat(p, true)); |
43 | } | 43 | } |
@@ -128,7 +128,7 @@ fn field_pat_list(p: &mut Parser) { | |||
128 | while !p.at(EOF) && !p.at(R_CURLY) { | 128 | while !p.at(EOF) && !p.at(R_CURLY) { |
129 | match p.current() { | 129 | match p.current() { |
130 | DOTDOT => p.bump(), | 130 | DOTDOT => p.bump(), |
131 | IDENT | RAW_IDENT if p.nth(1) == COLON => field_pat(p), | 131 | IDENT if p.nth(1) == COLON => field_pat(p), |
132 | L_CURLY => error_block(p, "expected ident"), | 132 | L_CURLY => error_block(p, "expected ident"), |
133 | _ => { | 133 | _ => { |
134 | bind_pat(p, false); | 134 | bind_pat(p, false); |
@@ -143,7 +143,7 @@ fn field_pat_list(p: &mut Parser) { | |||
143 | } | 143 | } |
144 | 144 | ||
145 | fn field_pat(p: &mut Parser) { | 145 | fn field_pat(p: &mut Parser) { |
146 | assert!(p.current().is_ident()); | 146 | assert!(p.at(IDENT)); |
147 | assert!(p.nth(1) == COLON); | 147 | assert!(p.nth(1) == COLON); |
148 | 148 | ||
149 | let m = p.start(); | 149 | let m = p.start(); |