File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
compiler/rustc_parse/src/parser Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -1719,7 +1719,7 @@ impl<'a> Parser<'a> {
1719
1719
let capture_clause = self . parse_capture_clause ( ) ?;
1720
1720
let decl = self . parse_fn_block_decl ( ) ?;
1721
1721
let decl_hi = self . prev_token . span ;
1722
- let body = match decl. output {
1722
+ let mut body = match decl. output {
1723
1723
FnRetTy :: Default ( _) => {
1724
1724
let restrictions = self . restrictions - Restrictions :: STMT_EXPR ;
1725
1725
self . parse_expr_res ( restrictions, None ) ?
@@ -1744,8 +1744,7 @@ impl<'a> Parser<'a> {
1744
1744
// It is likely that the closure body is a block but where the
1745
1745
// braces have been removed. We will recover and eat the next
1746
1746
// statements later in the parsing process.
1747
-
1748
- return Ok ( self . mk_expr_err ( lo. to ( body. span ) ) ) ;
1747
+ body = self . mk_expr_err ( body. span ) ;
1749
1748
}
1750
1749
1751
1750
Ok ( self . mk_expr (
You can’t perform that action at this time.
0 commit comments