diff options
Diffstat (limited to 'crates/libsyntax2/src/grammar/expressions/atom.rs')
-rw-r--r-- | crates/libsyntax2/src/grammar/expressions/atom.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/libsyntax2/src/grammar/expressions/atom.rs b/crates/libsyntax2/src/grammar/expressions/atom.rs index d9c3f998a..bb5402af7 100644 --- a/crates/libsyntax2/src/grammar/expressions/atom.rs +++ b/crates/libsyntax2/src/grammar/expressions/atom.rs | |||
@@ -237,11 +237,13 @@ fn for_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker { | |||
237 | // test cond | 237 | // test cond |
238 | // fn foo() { if let Some(_) = None {} } | 238 | // fn foo() { if let Some(_) = None {} } |
239 | fn cond(p: &mut Parser) { | 239 | fn cond(p: &mut Parser) { |
240 | let m = p.start(); | ||
240 | if p.eat(LET_KW) { | 241 | if p.eat(LET_KW) { |
241 | patterns::pattern(p); | 242 | patterns::pattern(p); |
242 | p.expect(EQ); | 243 | p.expect(EQ); |
243 | } | 244 | } |
244 | expr_no_struct(p) | 245 | expr_no_struct(p); |
246 | m.complete(p, CONDITION); | ||
245 | } | 247 | } |
246 | 248 | ||
247 | // test match_expr | 249 | // test match_expr |