mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Leave a FIXME re. allow_plus
.
This commit is contained in:
parent
fa828d7a05
commit
404013e015
@ -42,11 +42,12 @@ impl<'a> Parser<'a> {
|
||||
|
||||
/// Parses an optional return type `[ -> TY ]` in a function declaration.
|
||||
pub(super) fn parse_ret_ty(&mut self, allow_plus: bool) -> PResult<'a, FunctionRetTy> {
|
||||
if self.eat(&token::RArrow) {
|
||||
Ok(FunctionRetTy::Ty(self.parse_ty_common(allow_plus, true, false)?))
|
||||
Ok(if self.eat(&token::RArrow) {
|
||||
// FIXME(Centril): Can we unconditionally `allow_plus`?
|
||||
FunctionRetTy::Ty(self.parse_ty_common(allow_plus, true, false)?)
|
||||
} else {
|
||||
Ok(FunctionRetTy::Default(self.token.span.shrink_to_lo()))
|
||||
}
|
||||
FunctionRetTy::Default(self.token.span.shrink_to_lo())
|
||||
})
|
||||
}
|
||||
|
||||
pub(super) fn parse_ty_common(&mut self, allow_plus: bool, allow_qpath_recovery: bool,
|
||||
|
Loading…
Reference in New Issue
Block a user