From d9d0e5d36bb6b3e23b4869196788bd10b5220f31 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Mon, 30 Sep 2019 05:46:16 +0200 Subject: syntax: cleanup `parse_fn_decl`. --- src/libsyntax/parse/parser/item.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/libsyntax/parse/parser') 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> { - 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)?, })) } -- cgit 1.4.1-3-g733a5