mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Fix parsing of _ = x
in closure body
This commit is contained in:
parent
21e61bee8b
commit
ed48bd8b9d
4 changed files with 36 additions and 1 deletions
|
@ -278,6 +278,8 @@ fn closure_expr(p: &mut Parser<'_>) -> CompletedMarker {
|
|||
// fn main() { || -> i32 { 92 }(); }
|
||||
block_expr(p);
|
||||
} else if p.at_ts(EXPR_FIRST) {
|
||||
// test closure_body_underscore_assignment
|
||||
// fn main() { || _ = 0; }
|
||||
expr(p);
|
||||
} else {
|
||||
p.error("expected expression");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue