aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/grammar/expressions
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libsyntax2/src/grammar/expressions')
-rw-r--r--crates/libsyntax2/src/grammar/expressions/atom.rs4
-rw-r--r--crates/libsyntax2/src/grammar/expressions/mod.rs1
2 files changed, 5 insertions, 0 deletions
diff --git a/crates/libsyntax2/src/grammar/expressions/atom.rs b/crates/libsyntax2/src/grammar/expressions/atom.rs
index e83c82c92..ab4aa49d2 100644
--- a/crates/libsyntax2/src/grammar/expressions/atom.rs
+++ b/crates/libsyntax2/src/grammar/expressions/atom.rs
@@ -269,6 +269,10 @@ fn match_arm_list(p: &mut Parser) {
269 let m = p.start(); 269 let m = p.start();
270 p.eat(L_CURLY); 270 p.eat(L_CURLY);
271 while !p.at(EOF) && !p.at(R_CURLY) { 271 while !p.at(EOF) && !p.at(R_CURLY) {
272 if p.at(L_CURLY) {
273 error_block(p, "expected match arm");
274 continue;
275 }
272 // test match_arms_commas 276 // test match_arms_commas
273 // fn foo() { 277 // fn foo() {
274 // match () { 278 // match () {
diff --git a/crates/libsyntax2/src/grammar/expressions/mod.rs b/crates/libsyntax2/src/grammar/expressions/mod.rs
index fb702a398..9379ed938 100644
--- a/crates/libsyntax2/src/grammar/expressions/mod.rs
+++ b/crates/libsyntax2/src/grammar/expressions/mod.rs
@@ -433,6 +433,7 @@ fn named_field_list(p: &mut Parser) {
433 p.bump(); 433 p.bump();
434 expr(p); 434 expr(p);
435 } 435 }
436 L_CURLY => error_block(p, "expected a field"),
436 _ => p.err_and_bump("expected identifier"), 437 _ => p.err_and_bump("expected identifier"),
437 } 438 }
438 if !p.at(R_CURLY) { 439 if !p.at(R_CURLY) {