@@ -68,7 +68,7 @@ type abbrev_map = map::HashMap<ty::t, tyencode::ty_abbrev>;
68
68
69
69
pub type encode_inlined_item = fn @( ecx : @encode_ctxt ,
70
70
ebml_w : writer:: Encoder ,
71
- path : ast_map:: path ,
71
+ path : & [ ast_map:: path_elt ] ,
72
72
ii : ast:: inlined_item ) ;
73
73
74
74
type encode_parms = {
@@ -194,7 +194,7 @@ fn encode_ty_type_param_bounds(ebml_w: writer::Encoder, ecx: @encode_ctxt,
194
194
}
195
195
196
196
fn encode_type_param_bounds ( ebml_w : writer:: Encoder , ecx : @encode_ctxt ,
197
- params : ~ [ ty_param ] ) {
197
+ params : & [ ty_param ] ) {
198
198
let ty_param_bounds =
199
199
@params. map ( |param| ecx. tcx . ty_param_bounds . get ( param. id ) ) ;
200
200
encode_ty_type_param_bounds ( ebml_w, ecx, ty_param_bounds) ;
@@ -268,9 +268,10 @@ fn encode_parent_item(ebml_w: writer::Encoder, id: def_id) {
268
268
}
269
269
270
270
fn encode_enum_variant_info ( ecx : @encode_ctxt , ebml_w : writer:: Encoder ,
271
- id : node_id , variants : ~[ variant ] ,
272
- path : ast_map:: path , index : @mut ~[ entry < int > ] ,
273
- ty_params : ~[ ty_param ] ) {
271
+ id : node_id , variants : & [ variant ] ,
272
+ path : & [ ast_map:: path_elt ] ,
273
+ index : @mut ~[ entry < int > ] ,
274
+ ty_params : & [ ty_param ] ) {
274
275
let mut disr_val = 0 ;
275
276
let mut i = 0 ;
276
277
let vi = ty:: enum_variants ( ecx. tcx ,
@@ -297,8 +298,8 @@ fn encode_enum_variant_info(ecx: @encode_ctxt, ebml_w: writer::Encoder,
297
298
encode_disr_val ( ecx, ebml_w, vi[ i] . disr_val ) ;
298
299
disr_val = vi[ i] . disr_val ;
299
300
}
300
- encode_type_param_bounds ( ebml_w, ecx, /*bad*/ copy ty_params) ;
301
- encode_path ( ecx, ebml_w, & path,
301
+ encode_type_param_bounds ( ebml_w, ecx, ty_params) ;
302
+ encode_path ( ecx, ebml_w, path,
302
303
ast_map:: path_name ( variant. node . name ) ) ;
303
304
ebml_w. end_tag ( ) ;
304
305
disr_val += 1 ;
@@ -307,7 +308,7 @@ fn encode_enum_variant_info(ecx: @encode_ctxt, ebml_w: writer::Encoder,
307
308
}
308
309
309
310
fn encode_path ( ecx : @encode_ctxt , ebml_w : writer:: Encoder ,
310
- path : & ast_map:: path , name : ast_map:: path_elt ) {
311
+ path : & [ ast_map:: path_elt ] , name : ast_map:: path_elt ) {
311
312
fn encode_path_elt ( ecx : @encode_ctxt , ebml_w : writer:: Encoder ,
312
313
elt : ast_map:: path_elt ) {
313
314
let ( tag, name) = match elt {
@@ -328,7 +329,7 @@ fn encode_path(ecx: @encode_ctxt, ebml_w: writer::Encoder,
328
329
}
329
330
330
331
fn encode_info_for_mod ( ecx : @encode_ctxt , ebml_w : writer:: Encoder ,
331
- md : _mod , id : node_id , + path : ast_map:: path ,
332
+ md : _mod , id : node_id , path : & [ ast_map:: path_elt ] ,
332
333
name : ident ) {
333
334
ebml_w. start_tag ( tag_items_data_item) ;
334
335
encode_def_id ( ebml_w, local_def ( id) ) ;
@@ -357,7 +358,7 @@ fn encode_info_for_mod(ecx: @encode_ctxt, ebml_w: writer::Encoder,
357
358
}
358
359
}
359
360
360
- encode_path ( ecx, ebml_w, & path, ast_map:: path_mod ( name) ) ;
361
+ encode_path ( ecx, ebml_w, path, ast_map:: path_mod ( name) ) ;
361
362
362
363
// Encode the reexports of this module.
363
364
debug ! ( "(encoding info for module) encoding reexports for %d" , id) ;
@@ -434,8 +435,8 @@ fn encode_method_sort(ebml_w: writer::Encoder, sort: char) {
434
435
435
436
/* Returns an index of items in this class */
436
437
fn encode_info_for_struct ( ecx : @encode_ctxt , ebml_w : writer:: Encoder ,
437
- path : ast_map:: path ,
438
- fields : ~ [ @struct_field ] ,
438
+ path : & [ ast_map:: path_elt ] ,
439
+ fields : & [ @struct_field ] ,
439
440
global_index : @mut ~[ entry < int > ] ) -> ~[ entry < int > ] {
440
441
/* Each class has its own index, since different classes
441
442
may have fields with the same name */
@@ -455,7 +456,7 @@ fn encode_info_for_struct(ecx: @encode_ctxt, ebml_w: writer::Encoder,
455
456
tcx. sess. str_of( nm) , id) ;
456
457
encode_visibility ( ebml_w, vis) ;
457
458
encode_name ( ecx, ebml_w, nm) ;
458
- encode_path ( ecx, ebml_w, & path, ast_map:: path_name ( nm) ) ;
459
+ encode_path ( ecx, ebml_w, path, ast_map:: path_name ( nm) ) ;
459
460
encode_type ( ecx, ebml_w, node_id_to_type ( tcx, id) ) ;
460
461
encode_mutability ( ebml_w, mt) ;
461
462
encode_def_id ( ebml_w, local_def ( id) ) ;
@@ -469,8 +470,8 @@ fn encode_info_for_struct(ecx: @encode_ctxt, ebml_w: writer::Encoder,
469
470
470
471
// This is for encoding info for ctors and dtors
471
472
fn encode_info_for_ctor ( ecx : @encode_ctxt , ebml_w : writer:: Encoder ,
472
- id : node_id , ident : ident , + path : ast_map:: path ,
473
- item : Option < inlined_item > , + tps : ~ [ ty_param ] ) {
473
+ id : node_id , ident : ident , path : & [ ast_map:: path_elt ] ,
474
+ item : Option < inlined_item > , tps : & [ ty_param ] ) {
474
475
ebml_w. start_tag ( tag_items_data_item) ;
475
476
encode_name ( ecx, ebml_w, ident) ;
476
477
encode_def_id ( ebml_w, local_def ( id) ) ;
@@ -481,7 +482,7 @@ fn encode_info_for_ctor(ecx: @encode_ctxt, ebml_w: writer::Encoder,
481
482
ecx. tcx. sess. str_of( ident) ,
482
483
ty_to_str( ecx. tcx, its_ty) , id) ;
483
484
encode_type ( ecx, ebml_w, its_ty) ;
484
- encode_path ( ecx, ebml_w, & path, ast_map:: path_name ( ident) ) ;
485
+ encode_path ( ecx, ebml_w, path, ast_map:: path_name ( ident) ) ;
485
486
match item {
486
487
Some ( ref it) => {
487
488
( ecx. encode_inlined_item ) ( ecx, ebml_w, path, ( * it) ) ;
@@ -495,7 +496,7 @@ fn encode_info_for_ctor(ecx: @encode_ctxt, ebml_w: writer::Encoder,
495
496
496
497
fn encode_info_for_method ( ecx : @encode_ctxt ,
497
498
ebml_w : writer:: Encoder ,
498
- + impl_path : ast_map:: path ,
499
+ impl_path : & [ ast_map:: path_elt ] ,
499
500
should_inline : bool ,
500
501
parent_id : node_id ,
501
502
m : @method ,
@@ -514,7 +515,7 @@ fn encode_info_for_method(ecx: @encode_ctxt,
514
515
encode_type_param_bounds ( ebml_w, ecx, all_tps) ;
515
516
encode_type ( ecx, ebml_w, node_id_to_type ( ecx. tcx , m. id ) ) ;
516
517
encode_name ( ecx, ebml_w, m. ident ) ;
517
- encode_path ( ecx, ebml_w, & impl_path, ast_map:: path_name ( m. ident ) ) ;
518
+ encode_path ( ecx, ebml_w, impl_path, ast_map:: path_name ( m. ident ) ) ;
518
519
encode_self_type ( ebml_w, m. self_ty . node ) ;
519
520
if len > 0 u || should_inline {
520
521
( ecx. encode_inlined_item ) (
@@ -544,7 +545,7 @@ fn purity_static_method_family(p: purity) -> char {
544
545
}
545
546
546
547
547
- fn should_inline ( attrs: ~ [ attribute] ) -> bool {
548
+ fn should_inline ( attrs: & [ attribute] ) -> bool {
548
549
match attr:: find_inline_attr ( attrs) {
549
550
attr:: ia_none | attr:: ia_never => false ,
550
551
attr:: ia_hint | attr:: ia_always => true
@@ -554,7 +555,7 @@ fn should_inline(attrs: ~[attribute]) -> bool {
554
555
555
556
fn encode_info_for_item( ecx : @encode_ctxt , ebml_w : writer:: Encoder ,
556
557
item: @item, index : @mut ~[ entry < int > ] ,
557
- + path : ast_map:: path ) {
558
+ path : & [ ast_map:: path_elt ] ) {
558
559
559
560
let tcx = ecx. tcx ;
560
561
let must_write =
@@ -582,7 +583,7 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: writer::Encoder,
582
583
encode_family ( ebml_w, 'c' ) ;
583
584
encode_type ( ecx, ebml_w, node_id_to_type ( tcx, item. id ) ) ;
584
585
encode_symbol ( ecx, ebml_w, item. id ) ;
585
- encode_path ( ecx, ebml_w, & path, ast_map:: path_name ( item. ident ) ) ;
586
+ encode_path ( ecx, ebml_w, path, ast_map:: path_name ( item. ident ) ) ;
586
587
ebml_w. end_tag ( ) ;
587
588
}
588
589
item_fn( _, purity, tps, _) => {
@@ -593,8 +594,8 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: writer::Encoder,
593
594
let tps_len = tps. len ( ) ;
594
595
encode_type_param_bounds ( ebml_w, ecx, tps) ;
595
596
encode_type ( ecx, ebml_w, node_id_to_type ( tcx, item. id ) ) ;
596
- encode_path ( ecx, ebml_w, & path, ast_map:: path_name ( item. ident ) ) ;
597
- encode_attributes ( ebml_w, /*bad*/ copy item. attrs ) ;
597
+ encode_path ( ecx, ebml_w, path, ast_map:: path_name ( item. ident ) ) ;
598
+ encode_attributes ( ebml_w, item. attrs ) ;
598
599
if tps_len > 0 u || should_inline ( item. attrs ) {
599
600
( ecx. encode_inlined_item ) ( ecx, ebml_w, path, ii_item ( item) ) ;
600
601
} else {
@@ -612,7 +613,7 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: writer::Encoder,
612
613
encode_def_id ( ebml_w, local_def ( item. id ) ) ;
613
614
encode_family ( ebml_w, 'n' ) ;
614
615
encode_name ( ecx, ebml_w, item. ident ) ;
615
- encode_path ( ecx, ebml_w, & path, ast_map:: path_name ( item. ident ) ) ;
616
+ encode_path ( ecx, ebml_w, path, ast_map:: path_name ( item. ident ) ) ;
616
617
ebml_w. end_tag ( ) ;
617
618
}
618
619
item_ty( _, tps) => {
@@ -623,7 +624,7 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: writer::Encoder,
623
624
encode_type_param_bounds ( ebml_w, ecx, tps) ;
624
625
encode_type ( ecx, ebml_w, node_id_to_type ( tcx, item. id ) ) ;
625
626
encode_name ( ecx, ebml_w, item. ident ) ;
626
- encode_path ( ecx, ebml_w, & path, ast_map:: path_name ( item. ident ) ) ;
627
+ encode_path ( ecx, ebml_w, path, ast_map:: path_name ( item. ident ) ) ;
627
628
encode_region_param ( ecx, ebml_w, item) ;
628
629
ebml_w. end_tag ( ) ;
629
630
}
@@ -632,44 +633,42 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: writer::Encoder,
632
633
do ebml_w. wr_tag ( tag_items_data_item) {
633
634
encode_def_id ( ebml_w, local_def ( item. id ) ) ;
634
635
encode_family ( ebml_w, 't' ) ;
635
- encode_type_param_bounds ( ebml_w, ecx, /*bad*/ copy * tps) ;
636
+ encode_type_param_bounds ( ebml_w, ecx, * tps) ;
636
637
encode_type ( ecx, ebml_w, node_id_to_type ( tcx, item. id ) ) ;
637
638
encode_name ( ecx, ebml_w, item. ident ) ;
638
639
for ( * enum_definition) . variants. each |v| {
639
640
encode_variant_id( ebml_w, local_def( v. node. id) ) ;
640
641
}
641
- ( ecx. encode_inlined_item ) ( ecx, ebml_w, /*bad*/ copy path,
642
- ii_item ( item) ) ;
643
- encode_path ( ecx, ebml_w, & path, ast_map:: path_name ( item. ident ) ) ;
642
+ ( ecx. encode_inlined_item ) ( ecx, ebml_w, path, ii_item ( item) ) ;
643
+ encode_path ( ecx, ebml_w, path, ast_map:: path_name ( item. ident ) ) ;
644
644
encode_region_param ( ecx, ebml_w, item) ;
645
645
}
646
646
encode_enum_variant_info( ecx,
647
647
ebml_w,
648
648
item. id,
649
- /*bad*/ copy ( * enum_definition) . variants,
649
+ ( * enum_definition) . variants,
650
650
path,
651
651
index,
652
- /*bad*/ copy * tps) ;
652
+ * tps) ;
653
653
}
654
654
item_struct( struct_def, tps) => {
655
655
/* First, encode the fields
656
656
These come first because we need to write them to make
657
657
the index, and the index needs to be in the item for the
658
658
class itself */
659
- // XXX: Bad copy of `path`.
660
- let idx = encode_info_for_struct ( ecx, ebml_w, copy path,
661
- /*bad*/ copy struct_def. fields , index) ;
659
+ let idx = encode_info_for_struct ( ecx, ebml_w, path,
660
+ struct_def. fields , index) ;
662
661
/* Encode the dtor */
663
662
do struct_def. dtor . iter |dtor| {
664
663
index. push ( { val: dtor. node . id , pos: ebml_w. writer . tell ( ) } ) ;
665
664
encode_info_for_ctor ( ecx, ebml_w, dtor. node . id ,
666
665
ecx. tcx . sess . ident_of (
667
666
ecx. tcx . sess . str_of ( item. ident ) +
668
667
~"_dtor") ,
669
- /*bad*/ copy path, if tps. len ( ) > 0 u {
668
+ path, if tps. len ( ) > 0 u {
670
669
Some ( ii_dtor ( * dtor, item. ident , tps,
671
670
local_def ( item. id ) ) ) }
672
- else { None } , /*bad*/ copy tps) ;
671
+ else { None } , tps) ;
673
672
}
674
673
675
674
/* Index the class*/
@@ -681,7 +680,7 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: writer::Encoder,
681
680
encode_type_param_bounds ( ebml_w, ecx, tps) ;
682
681
encode_type ( ecx, ebml_w, node_id_to_type ( tcx, item. id ) ) ;
683
682
encode_name ( ecx, ebml_w, item. ident ) ;
684
- encode_path ( ecx, ebml_w, & path, ast_map:: path_name ( item. ident ) ) ;
683
+ encode_path ( ecx, ebml_w, path, ast_map:: path_name ( item. ident ) ) ;
685
684
encode_region_param ( ecx, ebml_w, item) ;
686
685
/* Encode the dtor */
687
686
/* Encode id for dtor */
@@ -718,11 +717,10 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: writer::Encoder,
718
717
encode_def_id ( ebml_w, local_def ( item. id ) ) ;
719
718
encode_family ( ebml_w, 'i' ) ;
720
719
encode_region_param ( ecx, ebml_w, item) ;
721
- // XXX: Bad copy.
722
- encode_type_param_bounds ( ebml_w, ecx, copy tps) ;
720
+ encode_type_param_bounds ( ebml_w, ecx, tps) ;
723
721
encode_type ( ecx, ebml_w, node_id_to_type ( tcx, item. id ) ) ;
724
722
encode_name ( ecx, ebml_w, item. ident ) ;
725
- encode_attributes ( ebml_w, /*bad*/ copy item. attrs ) ;
723
+ encode_attributes ( ebml_w, item. attrs ) ;
726
724
match ty. node {
727
725
ast:: ty_path( path, _) if path. idents . len ( ) == 1 => {
728
726
encode_impl_type_basename ( ecx, ebml_w,
@@ -739,15 +737,17 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: writer::Encoder,
739
737
do opt_trait. iter ( ) |associated_trait| {
740
738
encode_trait_ref ( ebml_w, ecx, * associated_trait) ;
741
739
}
742
- encode_path ( ecx, ebml_w, & path, ast_map:: path_name ( item. ident ) ) ;
740
+ encode_path ( ecx, ebml_w, path, ast_map:: path_name ( item. ident ) ) ;
743
741
ebml_w. end_tag ( ) ;
744
742
745
- let impl_path = vec:: append_one ( path,
746
- ast_map:: path_name ( item. ident ) ) ;
743
+ // >:-<
744
+ let mut impl_path = vec:: append ( ~[ ] , path) ;
745
+ impl_path += ~[ ast_map:: path_name ( item. ident ) ] ;
746
+
747
747
for methods. each |m| {
748
748
index. push ( { val: m. id , pos: ebml_w. writer . tell ( ) } ) ;
749
- encode_info_for_method ( ecx, ebml_w, /*bad*/ copy impl_path,
750
- should_inline ( /*bad*/ copy m. attrs ) ,
749
+ encode_info_for_method ( ecx, ebml_w, impl_path,
750
+ should_inline ( m. attrs ) ,
751
751
item. id , * m,
752
752
vec:: append ( /*bad*/ copy tps, m. tps ) ) ;
753
753
}
@@ -760,10 +760,10 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: writer::Encoder,
760
760
encode_def_id ( ebml_w, local_def ( item. id ) ) ;
761
761
encode_family ( ebml_w, 'I' ) ;
762
762
encode_region_param ( ecx, ebml_w, item) ;
763
- encode_type_param_bounds ( ebml_w, ecx, /*bad*/ copy * tps) ;
763
+ encode_type_param_bounds ( ebml_w, ecx, * tps) ;
764
764
encode_type ( ecx, ebml_w, node_id_to_type ( tcx, item. id ) ) ;
765
765
encode_name ( ecx, ebml_w, item. ident ) ;
766
- encode_attributes ( ebml_w, /*bad*/ copy item. attrs ) ;
766
+ encode_attributes ( ebml_w, item. attrs ) ;
767
767
let mut i = 0 u;
768
768
for vec:: each( * ty:: trait_methods ( tcx, local_def ( item. id ) ) ) |mty| {
769
769
match ( * ms) [ i] {
@@ -772,7 +772,7 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: writer::Encoder,
772
772
encode_def_id ( ebml_w, local_def ( ( * ty_m) . id ) ) ;
773
773
encode_name ( ecx, ebml_w, mty. ident ) ;
774
774
encode_type_param_bounds ( ebml_w, ecx,
775
- /*bad*/ copy ( * ty_m) . tps ) ;
775
+ ( * ty_m) . tps ) ;
776
776
encode_type ( ecx, ebml_w, ty:: mk_fn ( tcx, /*bad*/ copy mty. fty ) ) ;
777
777
encode_family ( ebml_w, purity_fn_family ( mty. fty . meta . purity ) ) ;
778
778
encode_self_type ( ebml_w, mty. self_ty ) ;
@@ -785,17 +785,17 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: writer::Encoder,
785
785
ebml_w. start_tag ( tag_item_trait_method) ;
786
786
encode_def_id ( ebml_w, local_def ( m. id ) ) ;
787
787
encode_name ( ecx, ebml_w, mty. ident ) ;
788
- encode_type_param_bounds ( ebml_w, ecx, /*bad*/ copy m. tps ) ;
788
+ encode_type_param_bounds ( ebml_w, ecx, m. tps ) ;
789
789
encode_type ( ecx, ebml_w, ty:: mk_fn ( tcx, /*bad*/ copy mty. fty ) ) ;
790
790
encode_family ( ebml_w, purity_fn_family ( mty. fty . meta . purity ) ) ;
791
791
encode_self_type ( ebml_w, mty. self_ty ) ;
792
792
encode_method_sort ( ebml_w, 'p' ) ;
793
793
ebml_w. end_tag ( ) ;
794
794
}
795
795
}
796
- i += 1 u ;
796
+ i += 1 ;
797
797
}
798
- encode_path ( ecx, ebml_w, & path, ast_map:: path_name ( item. ident ) ) ;
798
+ encode_path ( ecx, ebml_w, path, ast_map:: path_name ( item. ident ) ) ;
799
799
for traits. each |associated_trait| {
800
800
encode_trait_ref( ebml_w, ecx, * associated_trait)
801
801
}
@@ -821,9 +821,9 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: writer::Encoder,
821
821
let polyty = ecx. tcx . tcache . get ( local_def ( ty_m. id ) ) ;
822
822
encode_ty_type_param_bounds ( ebml_w, ecx, polyty. bounds ) ;
823
823
encode_type ( ecx, ebml_w, polyty. ty ) ;
824
- let m_path = vec:: append_one ( /*bad*/ copy path ,
825
- ast_map:: path_name ( item. ident ) ) ;
826
- encode_path ( ecx, ebml_w, & m_path, ast_map:: path_name ( ty_m. ident ) ) ;
824
+ let mut m_path = vec:: append ( ~ [ ] , path ) ; // :-(
825
+ m_path += [ ast_map:: path_name ( item. ident ) ] ;
826
+ encode_path ( ecx, ebml_w, m_path, ast_map:: path_name ( ty_m. ident ) ) ;
827
827
ebml_w. end_tag ( ) ;
828
828
}
829
829
@@ -855,20 +855,18 @@ fn encode_info_for_foreign_item(ecx: @encode_ctxt,
855
855
encode_type_param_bounds ( ebml_w, ecx, tps) ;
856
856
encode_type ( ecx, ebml_w, node_id_to_type ( ecx. tcx , nitem. id ) ) ;
857
857
if abi == foreign_abi_rust_intrinsic {
858
- // XXX: Bad copy of `path`.
859
- ( ecx. encode_inlined_item ) ( ecx, ebml_w, copy path,
860
- ii_foreign ( nitem) ) ;
858
+ ( ecx. encode_inlined_item ) ( ecx, ebml_w, path, ii_foreign ( nitem) ) ;
861
859
} else {
862
860
encode_symbol ( ecx, ebml_w, nitem. id ) ;
863
861
}
864
- encode_path ( ecx, ebml_w, & path, ast_map:: path_name ( nitem. ident ) ) ;
862
+ encode_path ( ecx, ebml_w, path, ast_map:: path_name ( nitem. ident ) ) ;
865
863
}
866
864
foreign_item_const( * ) => {
867
865
encode_def_id ( ebml_w, local_def ( nitem. id ) ) ;
868
866
encode_family ( ebml_w, 'c' ) ;
869
867
encode_type ( ecx, ebml_w, node_id_to_type ( ecx. tcx , nitem. id ) ) ;
870
868
encode_symbol ( ecx, ebml_w, nitem. id ) ;
871
- encode_path ( ecx, ebml_w, & path, ast_map:: path_name ( nitem. ident ) ) ;
869
+ encode_path ( ecx, ebml_w, path, ast_map:: path_name ( nitem. ident ) ) ;
872
870
}
873
871
}
874
872
ebml_w. end_tag ( ) ;
@@ -888,7 +886,7 @@ fn encode_info_for_items(ecx: @encode_ctxt, ebml_w: writer::Encoder,
888
886
visit:: visit_item ( i, cx, v) ;
889
887
match ecx. tcx . items . get ( i. id ) {
890
888
ast_map:: node_item( _, pt) => {
891
- encode_info_for_item ( ecx, ebml_w, i, index, /*bad*/ copy * pt) ;
889
+ encode_info_for_item ( ecx, ebml_w, i, index, * pt) ;
892
890
}
893
891
_ => fail ~"bad item"
894
892
}
@@ -1001,7 +999,7 @@ fn encode_meta_item(ebml_w: writer::Encoder, mi: meta_item) {
1001
999
}
1002
1000
}
1003
1001
1004
- fn encode_attributes ( ebml_w : writer:: Encoder , attrs : ~ [ attribute ] ) {
1002
+ fn encode_attributes ( ebml_w : writer:: Encoder , attrs : & [ attribute ] ) {
1005
1003
ebml_w. start_tag ( tag_attributes) ;
1006
1004
for attrs. each |attr| {
1007
1005
ebml_w. start_tag ( tag_attribute) ;
0 commit comments