From 59221e9ac886eb84437a4b94cd75db8ac8fa1161 Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Thu, 28 Jun 2012 13:52:13 -0700 Subject: replace more vector + (issue #2719) --- src/libsyntax/ext/auto_serialize.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/libsyntax/ext') 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})); -- cgit 1.4.1-3-g733a5