mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
add impl works with lifetimes
This commit is contained in:
parent
ba02a55330
commit
15f15d92eb
6 changed files with 202 additions and 17 deletions
|
@ -151,10 +151,11 @@ fn lambda_expr(p: &mut Parser) -> CompletedMarker {
|
|||
p.eat(MOVE_KW);
|
||||
params::param_list_opt_types(p);
|
||||
if opt_fn_ret_type(p) {
|
||||
block(p);
|
||||
} else {
|
||||
expr(p);
|
||||
if !p.at(L_CURLY) {
|
||||
p.error("expected `{`");
|
||||
}
|
||||
}
|
||||
expr(p);
|
||||
m.complete(p, LAMBDA_EXPR)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue