diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-01 16:00:08 +0100 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-12 17:54:49 +0100 |
| commit | 34d91709b672d91ea9623ae4bc2275e8b003fc2c (patch) | |
| tree | 9b7b2c12d75a6ff4e8e9af725c778b09d1bba319 /src/librustc_parse/parser/path.rs | |
| parent | 404013e015d9a9f4835cda47e56aab5223f278ed (diff) | |
| download | rust-34d91709b672d91ea9623ae4bc2275e8b003fc2c.tar.gz rust-34d91709b672d91ea9623ae4bc2275e8b003fc2c.zip | |
parse: refactor fun ret ty & param ty
Diffstat (limited to 'src/librustc_parse/parser/path.rs')
| -rw-r--r-- | src/librustc_parse/parser/path.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/librustc_parse/parser/path.rs b/src/librustc_parse/parser/path.rs index 5334fc485e7..aeba6dd2f67 100644 --- a/src/librustc_parse/parser/path.rs +++ b/src/librustc_parse/parser/path.rs @@ -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() }; |
