1
Fork 0

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,3 +1,4 @@
use super::ty::{AllowPlus, RecoverQPath};
use super::{Parser, TokenType};
use crate::maybe_whole;
use rustc_errors::{pluralize, Applicability, PResult};
@ -224,7 +225,7 @@ impl<'a> Parser<'a> {
// `(T, U) -> R`
let (inputs, _) = self.parse_paren_comma_seq(|p| p.parse_ty())?;
let span = ident.span.to(self.prev_span);
let output = self.parse_ret_ty(false, false)?;
let output = self.parse_ret_ty(AllowPlus::No, RecoverQPath::No)?;
ParenthesizedArgs { inputs, output, span }.into()
};