parse_ty_common: use enums instead of bools.

This commit is contained in:
Mazdak Farrokhzad 2020-01-29 01:57:24 +01:00
parent c9290dceee
commit c0b7b41cff
5 changed files with 52 additions and 29 deletions

View file

@ -1,4 +1,5 @@
use super::pat::{GateOr, PARAM_EXPECTED};
use super::ty::{AllowPlus, RecoverQPath};
use super::{BlockMode, Parser, PathStyle, PrevTokenKind, Restrictions, TokenType};
use super::{SemiColonMode, SeqSep, TokenExpectType};
use crate::maybe_recover_from_interpolated_ty_qpath;
@ -1399,7 +1400,7 @@ impl<'a> Parser<'a> {
self.expect_or()?;
args
};
let output = self.parse_ret_ty(true, true)?;
let output = self.parse_ret_ty(AllowPlus::Yes, RecoverQPath::Yes)?;
Ok(P(FnDecl { inputs, output }))
}