aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/grammar/expressions
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-28 21:59:57 +0100
committerAleksey Kladov <[email protected]>2018-08-28 21:59:57 +0100
commit15f15d92eb4d6ab791047eefbd6dd9b2baba1140 (patch)
tree3f8fde6b53446c9ecfeac4f6bd2f34da5a91aa33 /crates/libsyntax2/src/grammar/expressions
parentba02a55330d2ec9a0ea2c5cd457b82782ae299e9 (diff)
add impl works with lifetimes
Diffstat (limited to 'crates/libsyntax2/src/grammar/expressions')
-rw-r--r--crates/libsyntax2/src/grammar/expressions/atom.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/libsyntax2/src/grammar/expressions/atom.rs b/crates/libsyntax2/src/grammar/expressions/atom.rs
index 0769bb5a8..a17c27b31 100644
--- a/crates/libsyntax2/src/grammar/expressions/atom.rs
+++ b/crates/libsyntax2/src/grammar/expressions/atom.rs
@@ -151,10 +151,11 @@ fn lambda_expr(p: &mut Parser) -> CompletedMarker {
151 p.eat(MOVE_KW); 151 p.eat(MOVE_KW);
152 params::param_list_opt_types(p); 152 params::param_list_opt_types(p);
153 if opt_fn_ret_type(p) { 153 if opt_fn_ret_type(p) {
154 block(p); 154 if !p.at(L_CURLY) {
155 } else { 155 p.error("expected `{`");
156 expr(p); 156 }
157 } 157 }
158 expr(p);
158 m.complete(p, LAMBDA_EXPR) 159 m.complete(p, LAMBDA_EXPR)
159} 160}
160 161