Fix parsing of _ = x in closure body

This commit is contained in:
Jonas Schievink 2022-12-12 12:57:29 +01:00
parent 21e61bee8b
commit ed48bd8b9d
4 changed files with 36 additions and 1 deletions

View file

@ -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");