Skip to content

Commit 404013e

Browse files
committed
Leave a FIXME re. allow_plus.
1 parent fa828d7 commit 404013e

File tree

1 file changed

+5
-4
lines changed
  • src/librustc_parse/parser

1 file changed

+5
-4
lines changed

src/librustc_parse/parser/ty.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)