diff options
| author | Michael Sullivan <sully@msully.net> | 2012-05-24 14:49:39 -0700 |
|---|---|---|
| committer | Michael Sullivan <sully@msully.net> | 2012-05-25 16:39:35 -0700 |
| commit | 8668d06400710f9d99d1b39da847031dc3d78394 (patch) | |
| tree | e9b16f7ed60e3819ed53f86d94378916f17ffb74 /src/rustc/metadata/encoder.rs | |
| parent | d89b4c8c61b4995559c2e5b963d58b5dd599fdf3 (diff) | |
| download | rust-8668d06400710f9d99d1b39da847031dc3d78394.tar.gz rust-8668d06400710f9d99d1b39da847031dc3d78394.zip | |
Get rid of many implicit copies as a preliminary to Issue #2448.
Diffstat (limited to 'src/rustc/metadata/encoder.rs')
| -rw-r--r-- | src/rustc/metadata/encoder.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rustc/metadata/encoder.rs b/src/rustc/metadata/encoder.rs index 50683ec3283..56a1371d289 100644 --- a/src/rustc/metadata/encoder.rs +++ b/src/rustc/metadata/encoder.rs @@ -552,7 +552,7 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: ebml::writer, item: @item, index: @mut [entry<int>]) { *index += [{val: item.id, pos: ebml_w.writer.tell()}]; } - let add_to_index = bind add_to_index_(item, ebml_w, index); + let add_to_index = bind add_to_index_(item, copy ebml_w, index); alt item.node { item_const(_, _) { @@ -796,7 +796,7 @@ fn encode_info_for_items(ecx: @encode_ctxt, ebml_w: ebml::writer, crate_node_id, [], ""); visit::visit_crate(*crate, (), visit::mk_vt(@{ visit_expr: {|_e, _cx, _v|}, - visit_item: {|i, cx, v| + visit_item: {|i, cx, v, copy ebml_w| visit::visit_item(i, cx, v); alt check ecx.tcx.items.get(i.id) { ast_map::node_item(_, pt) { @@ -820,7 +820,7 @@ fn encode_info_for_items(ecx: @encode_ctxt, ebml_w: ebml::writer, } } }, - visit_native_item: {|ni, cx, v| + visit_native_item: {|ni, cx, v, copy ebml_w| visit::visit_native_item(ni, cx, v); alt check ecx.tcx.items.get(ni.id) { ast_map::node_native_item(_, abi, pt) { |
