File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/librustc_parse/parser Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,12 @@ impl<'a> Parser<'a> {
42
42
43
43
/// Parses an optional return type `[ -> TY ]` in a function declaration.
44
44
pub ( super ) fn parse_ret_ty ( & mut self , allow_plus : bool ) -> PResult < ' a , FunctionRetTy > {
45
- if self . eat ( & token:: RArrow ) {
46
- Ok ( FunctionRetTy :: Ty ( self . parse_ty_common ( allow_plus, true , false ) ?) )
45
+ Ok ( if self . eat ( & token:: RArrow ) {
46
+ // FIXME(Centril): Can we unconditionally `allow_plus`?
47
+ FunctionRetTy :: Ty ( self . parse_ty_common ( allow_plus, true , false ) ?)
47
48
} else {
48
- Ok ( FunctionRetTy :: Default ( self . token . span . shrink_to_lo ( ) ) )
49
- }
49
+ FunctionRetTy :: Default ( self . token . span . shrink_to_lo ( ) )
50
+ } )
50
51
}
51
52
52
53
pub ( super ) fn parse_ty_common ( & mut self , allow_plus : bool , allow_qpath_recovery : bool ,
You can’t perform that action at this time.
0 commit comments