diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-09-30 05:46:16 +0200 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-09-30 05:46:16 +0200 |
| commit | d9d0e5d36bb6b3e23b4869196788bd10b5220f31 (patch) | |
| tree | 142eb7a2825c181f7b2720dc470d4405d76a8c50 /src/libsyntax/parse | |
| parent | 347deac455c5365e6e74de3ca44b83ed77de41f3 (diff) | |
| download | rust-d9d0e5d36bb6b3e23b4869196788bd10b5220f31.tar.gz rust-d9d0e5d36bb6b3e23b4869196788bd10b5220f31.zip | |
syntax: cleanup `parse_fn_decl`.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser/item.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libsyntax/parse/parser/item.rs b/src/libsyntax/parse/parser/item.rs index 69fbb343ff3..2f353b65783 100644 --- a/src/libsyntax/parse/parser/item.rs +++ b/src/libsyntax/parse/parser/item.rs @@ -1274,14 +1274,11 @@ impl<'a> Parser<'a> { Ok((id, generics)) } - /// Parses the argument list and result type of a function declaration. + /// Parses the parameter list and result type of a function declaration. fn parse_fn_decl(&mut self, allow_c_variadic: bool) -> PResult<'a, P<FnDecl>> { - let args = self.parse_fn_params(true, allow_c_variadic)?; - let ret_ty = self.parse_ret_ty(true)?; - Ok(P(FnDecl { - inputs: args, - output: ret_ty, + inputs: self.parse_fn_params(true, allow_c_variadic)?, + output: self.parse_ret_ty(true)?, })) } |
