File tree 2 files changed +14
-10
lines changed
2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -4092,20 +4092,20 @@ impl<'a> Parser<'a> {
4092
4092
( optional_unboxed_closure_kind, args)
4093
4093
}
4094
4094
} ;
4095
- let output = if self . eat ( & token:: RARROW ) {
4096
- self . parse_ty ( true )
4095
+ let ( style , output) = if self . token == token :: RARROW {
4096
+ self . parse_ret_ty ( )
4097
4097
} else {
4098
- P ( Ty {
4098
+ ( Return , P ( Ty {
4099
4099
id : ast:: DUMMY_NODE_ID ,
4100
4100
node : TyInfer ,
4101
4101
span : self . span ,
4102
- } )
4102
+ } ) )
4103
4103
} ;
4104
4104
4105
4105
( P ( FnDecl {
4106
4106
inputs : inputs_captures,
4107
4107
output : output,
4108
- cf : Return ,
4108
+ cf : style ,
4109
4109
variadic : false
4110
4110
} ) , optional_unboxed_closure_kind)
4111
4111
}
@@ -4118,20 +4118,20 @@ impl<'a> Parser<'a> {
4118
4118
seq_sep_trailing_allowed ( token:: COMMA ) ,
4119
4119
|p| p. parse_fn_block_arg ( ) ) ;
4120
4120
4121
- let output = if self . eat ( & token:: RARROW ) {
4122
- self . parse_ty ( true )
4121
+ let ( style , output) = if self . token == token :: RARROW {
4122
+ self . parse_ret_ty ( )
4123
4123
} else {
4124
- P ( Ty {
4124
+ ( Return , P ( Ty {
4125
4125
id : ast:: DUMMY_NODE_ID ,
4126
4126
node : TyInfer ,
4127
4127
span : self . span ,
4128
- } )
4128
+ } ) )
4129
4129
} ;
4130
4130
4131
4131
P ( FnDecl {
4132
4132
inputs : inputs,
4133
4133
output : output,
4134
- cf : Return ,
4134
+ cf : style ,
4135
4135
variadic : false
4136
4136
} )
4137
4137
}
Original file line number Diff line number Diff line change @@ -78,6 +78,10 @@ fn bar<'b>() {
78
78
79
79
let a = A ;
80
80
a. foo:: <<' a >||>( ) ;
81
+
82
+ // issue #13490
83
+ let _ = || -> ! loop { } ;
84
+ let _ = proc ( ) -> ! loop { } ;
81
85
}
82
86
83
87
struct B < T > ;
You can’t perform that action at this time.
0 commit comments