about summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorSimon BD <simon@server>2012-10-06 13:15:18 -0500
committerSimon BD <simon@server>2012-10-06 13:15:18 -0500
commit0e3bec0ced8d781cdd93996e7b8eeedb13f81ba8 (patch)
tree4738dcf131910061f5253ee5ef42960b9aef35f5 /src/libsyntax/ext
parentd4a54837d4ab28219727e1f1e0c131ba6033ba94 (diff)
parentf96a2a2ca16a44f869336f7e28fc261551c1184c (diff)
downloadrust-0e3bec0ced8d781cdd93996e7b8eeedb13f81ba8.tar.gz
rust-0e3bec0ced8d781cdd93996e7b8eeedb13f81ba8.zip
Merge remote-tracking branch 'original/incoming' into incoming
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/pipes/ast_builder.rs8
-rw-r--r--src/libsyntax/ext/pipes/pipec.rs14
2 files changed, 6 insertions, 16 deletions
diff --git a/src/libsyntax/ext/pipes/ast_builder.rs b/src/libsyntax/ext/pipes/ast_builder.rs
index bfe0f4dd0e6..4da9992b0dd 100644
--- a/src/libsyntax/ext/pipes/ast_builder.rs
+++ b/src/libsyntax/ext/pipes/ast_builder.rs
@@ -48,7 +48,6 @@ trait ext_ctxt_ast_builder {
     fn ty_param(id: ast::ident, +bounds: ~[ast::ty_param_bound])
         -> ast::ty_param;
     fn arg(name: ident, ty: @ast::ty) -> ast::arg;
-    fn arg_mode(name: ident, ty: @ast::ty, mode: ast::rmode) -> ast::arg;
     fn expr_block(e: @ast::expr) -> ast::blk;
     fn fn_decl(+inputs: ~[ast::arg], output: @ast::ty) -> ast::fn_decl;
     fn item(name: ident, span: span, +node: ast::item_) -> @ast::item;
@@ -177,13 +176,6 @@ impl ext_ctxt: ext_ctxt_ast_builder {
          id: self.next_id()}
     }
 
-    fn arg_mode(name: ident, ty: @ast::ty, mode: ast::rmode) -> ast::arg {
-        {mode: ast::expl(mode),
-         ty: ty,
-         ident: name,
-         id: self.next_id()}
-    }
-
     fn block(+stmts: ~[@ast::stmt], e: @ast::expr) -> ast::blk {
         let blk = {view_items: ~[],
                    stmts: stmts,
diff --git a/src/libsyntax/ext/pipes/pipec.rs b/src/libsyntax/ext/pipes/pipec.rs
index 9c10d228a23..874ea01e9b0 100644
--- a/src/libsyntax/ext/pipes/pipec.rs
+++ b/src/libsyntax/ext/pipes/pipec.rs
@@ -47,16 +47,15 @@ impl message: gen_send {
             let arg_names = tys.mapi(|i, _ty| cx.ident_of(~"x_"+i.to_str()));
 
             let args_ast = (arg_names, tys).map(
-                |n, t| cx.arg_mode(*n, *t, ast::by_copy)
+                |n, t| cx.arg(*n, *t)
             );
 
             let pipe_ty = cx.ty_path_ast_builder(
                 path(~[this.data_name()], span)
                 .add_tys(cx.ty_vars(this.ty_params)));
             let args_ast = vec::append(
-                ~[cx.arg_mode(cx.ident_of(~"pipe"),
-                              pipe_ty,
-                              ast::by_copy)],
+                ~[cx.arg(cx.ident_of(~"pipe"),
+                              pipe_ty)],
                 args_ast);
 
             let mut body = ~"{\n";
@@ -129,15 +128,14 @@ impl message: gen_send {
                 let arg_names = tys.mapi(|i, _ty| (~"x_" + i.to_str()));
 
                 let args_ast = (arg_names, tys).map(
-                    |n, t| cx.arg_mode(cx.ident_of(*n), *t, ast::by_copy)
+                    |n, t| cx.arg(cx.ident_of(*n), *t)
                 );
 
                 let args_ast = vec::append(
-                    ~[cx.arg_mode(cx.ident_of(~"pipe"),
+                    ~[cx.arg(cx.ident_of(~"pipe"),
                                   cx.ty_path_ast_builder(
                                       path(~[this.data_name()], span)
-                                      .add_tys(cx.ty_vars(this.ty_params))),
-                                  ast::by_copy)],
+                                      .add_tys(cx.ty_vars(this.ty_params))))],
                     args_ast);
 
                 let message_args = if arg_names.len() == 0 {