diff options
author | Igor Aleksanov <[email protected]> | 2020-08-12 12:08:55 +0100 |
---|---|---|
committer | Igor Aleksanov <[email protected]> | 2020-08-12 12:08:55 +0100 |
commit | fcd4b0176f1544b389c9b028c547a1dfc92f9a56 (patch) | |
tree | bcca1afb725766cdf1eeb75aed3618c3e517345d /crates/ra_parser | |
parent | d180b8bbe8c9e31953069bae387b5214fbb51d64 (diff) |
Revert style preference-related fixes
Diffstat (limited to 'crates/ra_parser')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions/atom.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs index ca6569c9f..0b01d3bc6 100644 --- a/crates/ra_parser/src/grammar/expressions/atom.rs +++ b/crates/ra_parser/src/grammar/expressions/atom.rs | |||
@@ -243,10 +243,12 @@ fn lambda_expr(p: &mut Parser) -> CompletedMarker { | |||
243 | // test lambda_ret_block | 243 | // test lambda_ret_block |
244 | // fn main() { || -> i32 { 92 }(); } | 244 | // fn main() { || -> i32 { 92 }(); } |
245 | block_expr(p); | 245 | block_expr(p); |
246 | } else if p.at_ts(EXPR_FIRST) { | ||
247 | expr(p); | ||
248 | } else { | 246 | } else { |
249 | p.error("expected expression"); | 247 | if p.at_ts(EXPR_FIRST) { |
248 | expr(p); | ||
249 | } else { | ||
250 | p.error("expected expression"); | ||
251 | } | ||
250 | } | 252 | } |
251 | m.complete(p, CLOSURE_EXPR) | 253 | m.complete(p, CLOSURE_EXPR) |
252 | } | 254 | } |