@@ -1360,26 +1360,24 @@ impl<'a> Parser<'a> {
1360
1360
1361
1361
/// Parses the `|arg, arg|` header of a closure.
1362
1362
fn parse_fn_block_decl ( & mut self ) -> PResult < ' a , P < FnDecl > > {
1363
- let inputs_captures = {
1364
- if self . eat ( & token:: OrOr ) {
1365
- Vec :: new ( )
1366
- } else {
1367
- self . expect ( & token:: BinOp ( token:: Or ) ) ?;
1368
- let args = self
1369
- . parse_seq_to_before_tokens (
1370
- & [ & token:: BinOp ( token:: Or ) , & token:: OrOr ] ,
1371
- SeqSep :: trailing_allowed ( token:: Comma ) ,
1372
- TokenExpectType :: NoExpect ,
1373
- |p| p. parse_fn_block_param ( ) ,
1374
- ) ?
1375
- . 0 ;
1376
- self . expect_or ( ) ?;
1377
- args
1378
- }
1363
+ let inputs = if self . eat ( & token:: OrOr ) {
1364
+ Vec :: new ( )
1365
+ } else {
1366
+ self . expect ( & token:: BinOp ( token:: Or ) ) ?;
1367
+ let args = self
1368
+ . parse_seq_to_before_tokens (
1369
+ & [ & token:: BinOp ( token:: Or ) , & token:: OrOr ] ,
1370
+ SeqSep :: trailing_allowed ( token:: Comma ) ,
1371
+ TokenExpectType :: NoExpect ,
1372
+ |p| p. parse_fn_block_param ( ) ,
1373
+ ) ?
1374
+ . 0 ;
1375
+ self . expect_or ( ) ?;
1376
+ args
1379
1377
} ;
1380
1378
let output = self . parse_ret_ty ( true , true ) ?;
1381
1379
1382
- Ok ( P ( FnDecl { inputs : inputs_captures , output } ) )
1380
+ Ok ( P ( FnDecl { inputs, output } ) )
1383
1381
}
1384
1382
1385
1383
/// Parses a parameter in a closure header (e.g., `|arg, arg|`).
0 commit comments