aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/grammar/patterns.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-13 16:30:56 +0100
committerAleksey Kladov <[email protected]>2018-08-13 16:30:56 +0100
commit51f7f937a569680ddb0b2bbca2a74f861802898b (patch)
tree16844f4f6216587f87add068cffc7d1ad0461be0 /crates/libsyntax2/src/grammar/patterns.rs
parentc1a7b72fb7c9b69779e490e1d692ddfccec8b57a (diff)
Safer errors
Diffstat (limited to 'crates/libsyntax2/src/grammar/patterns.rs')
-rw-r--r--crates/libsyntax2/src/grammar/patterns.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/libsyntax2/src/grammar/patterns.rs b/crates/libsyntax2/src/grammar/patterns.rs
index 220f36db7..71a1d5445 100644
--- a/crates/libsyntax2/src/grammar/patterns.rs
+++ b/crates/libsyntax2/src/grammar/patterns.rs
@@ -117,11 +117,8 @@ fn struct_pat_fields(p: &mut Parser) {
117 p.bump(); 117 p.bump();
118 pattern(p); 118 pattern(p);
119 } 119 }
120 REF_KW | MUT_KW | IDENT => {
121 bind_pat(p, false);
122 },
123 _ => { 120 _ => {
124 p.err_and_bump("expected ident"); 121 bind_pat(p, false);
125 } 122 }
126 } 123 }
127 if !p.at(R_CURLY) { 124 if !p.at(R_CURLY) {