diff options
| author | bors <bors@rust-lang.org> | 2019-08-28 03:42:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-08-28 03:42:00 +0000 |
| commit | bbd48e6f166739344528a5fff4f02516b77d7916 (patch) | |
| tree | 7b8fc3d13d81af2bf40dfd5701f1b2a24ad73c5a /src/libsyntax/ext | |
| parent | b7178cbc0c950961dd130428905b65db61838951 (diff) | |
| parent | 97319b2b952c32ac1f0b36a834615b60b0376797 (diff) | |
| download | rust-bbd48e6f166739344528a5fff4f02516b77d7916.tar.gz rust-bbd48e6f166739344528a5fff4f02516b77d7916.zip | |
Auto merge of #63127 - kper:pr, r=nikomatsakis
Cleanup: Consistently use `Param` instead of `Arg` #62426 Fixes #62426
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/build.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index e2ac4d573a1..e894fd17ff5 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -655,7 +655,7 @@ impl<'a> ExtCtxt<'a> { body: P<ast::Expr>) -> P<ast::Expr> { let fn_decl = self.fn_decl( - ids.iter().map(|id| self.arg(span, *id, self.ty_infer(span))).collect(), + ids.iter().map(|id| self.param(span, *id, self.ty_infer(span))).collect(), ast::FunctionRetTy::Default(span)); // FIXME -- We are using `span` as the span of the `|...|` @@ -693,9 +693,9 @@ impl<'a> ExtCtxt<'a> { self.lambda1(span, self.expr_block(self.block(span, stmts)), ident) } - pub fn arg(&self, span: Span, ident: ast::Ident, ty: P<ast::Ty>) -> ast::Arg { + pub fn param(&self, span: Span, ident: ast::Ident, ty: P<ast::Ty>) -> ast::Param { let arg_pat = self.pat_ident(span, ident); - ast::Arg { + ast::Param { attrs: ThinVec::default(), id: ast::DUMMY_NODE_ID, pat: arg_pat, @@ -705,7 +705,7 @@ impl<'a> ExtCtxt<'a> { } // FIXME: unused `self` - pub fn fn_decl(&self, inputs: Vec<ast::Arg>, output: ast::FunctionRetTy) -> P<ast::FnDecl> { + pub fn fn_decl(&self, inputs: Vec<ast::Param>, output: ast::FunctionRetTy) -> P<ast::FnDecl> { P(ast::FnDecl { inputs, output, @@ -731,7 +731,7 @@ impl<'a> ExtCtxt<'a> { pub fn item_fn_poly(&self, span: Span, name: Ident, - inputs: Vec<ast::Arg> , + inputs: Vec<ast::Param> , output: P<ast::Ty>, generics: Generics, body: P<ast::Block>) -> P<ast::Item> { @@ -752,7 +752,7 @@ impl<'a> ExtCtxt<'a> { pub fn item_fn(&self, span: Span, name: Ident, - inputs: Vec<ast::Arg> , + inputs: Vec<ast::Param> , output: P<ast::Ty>, body: P<ast::Block> ) -> P<ast::Item> { |
