mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
fix assertione error on block parsing
This commit is contained in:
parent
fed5727ea2
commit
838820ad98
4 changed files with 9 additions and 10 deletions
|
@ -148,11 +148,7 @@ fn lambda_expr(p: &mut Parser) -> CompletedMarker {
|
|||
p.eat(MOVE_KW);
|
||||
params::param_list_opt_types(p);
|
||||
if opt_fn_ret_type(p) {
|
||||
if p.at(L_CURLY) {
|
||||
block(p);
|
||||
} else {
|
||||
p.error("expected a block");
|
||||
}
|
||||
block(p);
|
||||
} else {
|
||||
expr(p);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue