diff options
| author | Eric Holk <eric.holk@gmail.com> | 2012-06-28 13:52:13 -0700 |
|---|---|---|
| committer | Eric Holk <eric.holk@gmail.com> | 2012-06-28 13:52:23 -0700 |
| commit | 59221e9ac886eb84437a4b94cd75db8ac8fa1161 (patch) | |
| tree | 1d53799b7c7f5ed4e2240ac67affc2fa563e02b5 /src/libsyntax | |
| parent | 58a39d1ca363b900e2b341f501eb556ec576b523 (diff) | |
| download | rust-59221e9ac886eb84437a4b94cd75db8ac8fa1161.tar.gz rust-59221e9ac886eb84437a4b94cd75db8ac8fa1161.zip | |
replace more vector + (issue #2719)
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast_map.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/auto_serialize.rs | 17 |
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})); |
