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> {
4242
4343 /// Parses an optional return type `[ -> TY ]` in a function declaration.
4444 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 ) ?)
4748 } else {
48- Ok ( FunctionRetTy :: Default ( self . token . span . shrink_to_lo ( ) ) )
49- }
49+ FunctionRetTy :: Default ( self . token . span . shrink_to_lo ( ) )
50+ } )
5051 }
5152
5253 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