about summary refs log tree commit diff
path: root/src/libsyntax_ext
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-08-28 03:42:00 +0000
committerbors <bors@rust-lang.org>2019-08-28 03:42:00 +0000
commitbbd48e6f166739344528a5fff4f02516b77d7916 (patch)
tree7b8fc3d13d81af2bf40dfd5701f1b2a24ad73c5a /src/libsyntax_ext
parentb7178cbc0c950961dd130428905b65db61838951 (diff)
parent97319b2b952c32ac1f0b36a834615b60b0376797 (diff)
downloadrust-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/deriving/generic/mod.rs4
-rw-r--r--src/libsyntax_ext/global_allocator.rs12
2 files changed, 8 insertions, 8 deletions
diff --git a/src/libsyntax_ext/deriving/generic/mod.rs b/src/libsyntax_ext/deriving/generic/mod.rs
index 1475bac0688..6fd763f5a91 100644
--- a/src/libsyntax_ext/deriving/generic/mod.rs
+++ b/src/libsyntax_ext/deriving/generic/mod.rs
@@ -929,10 +929,10 @@ impl<'a> MethodDef<'a> {
         let args = {
             let self_args = explicit_self.map(|explicit_self| {
                 let ident = Ident::with_dummy_span(kw::SelfLower).with_span_pos(trait_.span);
-                ast::Arg::from_self(ThinVec::default(), explicit_self, ident)
+                ast::Param::from_self(ThinVec::default(), explicit_self, ident)
             });
             let nonself_args = arg_types.into_iter()
-                .map(|(name, ty)| cx.arg(trait_.span, name, ty));
+                .map(|(name, ty)| cx.param(trait_.span, name, ty));
             self_args.into_iter().chain(nonself_args).collect()
         };
 
diff --git a/src/libsyntax_ext/global_allocator.rs b/src/libsyntax_ext/global_allocator.rs
index 97b8087ad15..f4af1699cd6 100644
--- a/src/libsyntax_ext/global_allocator.rs
+++ b/src/libsyntax_ext/global_allocator.rs
@@ -1,5 +1,5 @@
 use syntax::ast::{ItemKind, Mutability, Stmt, Ty, TyKind, Unsafety};
-use syntax::ast::{self, Arg, Attribute, Expr, FnHeader, Generics, Ident};
+use syntax::ast::{self, Param, Attribute, Expr, FnHeader, Generics, Ident};
 use syntax::attr::check_builtin_macro_attribute;
 use syntax::ext::allocator::{AllocatorKind, AllocatorMethod, AllocatorTy, ALLOCATOR_METHODS};
 use syntax::ext::base::{Annotatable, ExtCtxt};
@@ -114,7 +114,7 @@ impl AllocFnFactory<'_, '_> {
     fn arg_ty(
         &self,
         ty: &AllocatorTy,
-        args: &mut Vec<Arg>,
+        args: &mut Vec<Param>,
         ident: &mut dyn FnMut() -> Ident,
     ) -> P<Expr> {
         match *ty {
@@ -123,8 +123,8 @@ impl AllocFnFactory<'_, '_> {
                 let ty_usize = self.cx.ty_path(usize);
                 let size = ident();
                 let align = ident();
-                args.push(self.cx.arg(self.span, size, ty_usize.clone()));
-                args.push(self.cx.arg(self.span, align, ty_usize));
+                args.push(self.cx.param(self.span, size, ty_usize.clone()));
+                args.push(self.cx.param(self.span, align, ty_usize));
 
                 let layout_new = self.cx.std_path(&[
                     Symbol::intern("alloc"),
@@ -140,14 +140,14 @@ impl AllocFnFactory<'_, '_> {
 
             AllocatorTy::Ptr => {
                 let ident = ident();
-                args.push(self.cx.arg(self.span, ident, self.ptr_u8()));
+                args.push(self.cx.param(self.span, ident, self.ptr_u8()));
                 let arg = self.cx.expr_ident(self.span, ident);
                 self.cx.expr_cast(self.span, arg, self.ptr_u8())
             }
 
             AllocatorTy::Usize => {
                 let ident = ident();
-                args.push(self.cx.arg(self.span, ident, self.usize()));
+                args.push(self.cx.param(self.span, ident, self.usize()));
                 self.cx.expr_ident(self.span, ident)
             }