parse: refactor fun ret ty & param ty
This commit is contained in:
parent
404013e015
commit
34d91709b6
12 changed files with 77 additions and 107 deletions
|
@ -182,11 +182,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 = if self.eat(&token::RArrow) {
|
||||
Some(self.parse_ty_common(false, false, false)?)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let output = self.parse_ret_ty(false, false)?;
|
||||
ParenthesizedArgs { inputs, output, span }.into()
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue