diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-08-10 13:29:39 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-09-28 17:38:59 +0300 |
| commit | 8a9d775888f6d413c10a823751bc14794a5a0c6d (patch) | |
| tree | 22c919937881b42270b9efaa872877c3f35ecd1b /src/libsyntax/parse/parser | |
| parent | f3c8eba643a815d720e7f20699b3dca144c845c4 (diff) | |
| download | rust-8a9d775888f6d413c10a823751bc14794a5a0c6d.tar.gz rust-8a9d775888f6d413c10a823751bc14794a5a0c6d.zip | |
syntax: don't keep a redundant c_variadic flag in the AST.
Diffstat (limited to 'src/libsyntax/parse/parser')
| -rw-r--r-- | src/libsyntax/parse/parser/expr.rs | 1 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser/item.rs | 3 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser/ty.rs | 3 |
3 files changed, 2 insertions, 5 deletions
diff --git a/src/libsyntax/parse/parser/expr.rs b/src/libsyntax/parse/parser/expr.rs index c776704b285..23674ad589d 100644 --- a/src/libsyntax/parse/parser/expr.rs +++ b/src/libsyntax/parse/parser/expr.rs @@ -1176,7 +1176,6 @@ impl<'a> Parser<'a> { Ok(P(FnDecl { inputs: inputs_captures, output, - c_variadic: false })) } diff --git a/src/libsyntax/parse/parser/item.rs b/src/libsyntax/parse/parser/item.rs index 370030d02c7..92b19b73e57 100644 --- a/src/libsyntax/parse/parser/item.rs +++ b/src/libsyntax/parse/parser/item.rs @@ -1292,13 +1292,12 @@ impl<'a> Parser<'a> { /// Parses the argument list and result type of a function declaration. fn parse_fn_decl(&mut self, allow_c_variadic: bool) -> PResult<'a, P<FnDecl>> { - let (args, c_variadic) = self.parse_fn_params(true, allow_c_variadic)?; + 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, - c_variadic, })) } diff --git a/src/libsyntax/parse/parser/ty.rs b/src/libsyntax/parse/parser/ty.rs index b4c006ca2b1..c52d3733b5e 100644 --- a/src/libsyntax/parse/parser/ty.rs +++ b/src/libsyntax/parse/parser/ty.rs @@ -292,12 +292,11 @@ impl<'a> Parser<'a> { }; self.expect_keyword(kw::Fn)?; - let (inputs, c_variadic) = self.parse_fn_params(false, true)?; + let inputs = self.parse_fn_params(false, true)?; let ret_ty = self.parse_ret_ty(false)?; let decl = P(FnDecl { inputs, output: ret_ty, - c_variadic, }); Ok(TyKind::BareFn(P(BareFnTy { abi, |
