about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorEric Holk <eric.holk@gmail.com>2012-06-28 13:52:13 -0700
committerEric Holk <eric.holk@gmail.com>2012-06-28 13:52:23 -0700
commit59221e9ac886eb84437a4b94cd75db8ac8fa1161 (patch)
tree1d53799b7c7f5ed4e2240ac67affc2fa563e02b5 /src/libsyntax
parent58a39d1ca363b900e2b341f501eb556ec576b523 (diff)
downloadrust-59221e9ac886eb84437a4b94cd75db8ac8fa1161.tar.gz
rust-59221e9ac886eb84437a4b94cd75db8ac8fa1161.zip
replace more vector + (issue #2719)
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast_map.rs2
-rw-r--r--src/libsyntax/ext/auto_serialize.rs17
2 files changed, 10 insertions, 9 deletions
diff --git a/src/libsyntax/ast_map.rs b/src/libsyntax/ast_map.rs
index 5c066bef98b..295f3416d36 100644
--- a/src/libsyntax/ast_map.rs
+++ b/src/libsyntax/ast_map.rs
@@ -57,7 +57,7 @@ type ctx = {map: map, mut path: path,
 type vt = visit::vt<ctx>;
 
 fn extend(cx: ctx, +elt: ident) -> @path {
-    @(cx.path + [path_name(elt)]/~)
+    @(vec::append(cx.path, [path_name(elt)]/~))
 }
 
 fn mk_ast_map_visitor() -> vt {
diff --git a/src/libsyntax/ext/auto_serialize.rs b/src/libsyntax/ext/auto_serialize.rs
index 06fb6b94f6e..b89be203e16 100644
--- a/src/libsyntax/ext/auto_serialize.rs
+++ b/src/libsyntax/ext/auto_serialize.rs
@@ -740,14 +740,15 @@ fn mk_deser_fn(cx: ext_ctxt, span: span,
             []/~))]/~;
 
     let deser_tps: [ast::ty_param]/~ =
-        [{ident: @"__D",
-          id: cx.next_id(),
-          bounds: deser_bnds}]/~ + vec::map(tps) {|tp|
-        let cloned = cx.clone_ty_param(tp);
-        {bounds: @(vec::append(*cloned.bounds,
-                               [ast::bound_copy]/~))
-         with cloned}
-    };
+        vec::append([{ident: @"__D",
+                      id: cx.next_id(),
+                      bounds: deser_bnds}]/~,
+                    vec::map(tps) {|tp|
+                        let cloned = cx.clone_ty_param(tp);
+                        {bounds: @(vec::append(*cloned.bounds,
+                                               [ast::bound_copy]/~))
+                         with cloned}
+                    });
 
     let deser_blk = cx.expr_blk(f(cx, tps_map, #ast(expr){__d}));