@@ -22,8 +22,6 @@ use metadata::decoder;
2222use metadata:: tydecode:: { parse_ty_data, parse_def_id, parse_bounds_data} ;
2323use middle:: { ty, resolve} ;
2424
25- use core:: dvec;
26- use core:: dvec:: DVec ;
2725use core:: hash:: { Hash , HashUtil } ;
2826use core:: int;
2927use core:: io:: WriterUtil ;
@@ -766,27 +764,27 @@ pub fn get_provided_trait_methods(intr: @ident_interner, cdata: cmd,
766764/// Returns the supertraits of the given trait.
767765pub fn get_supertraits ( cdata : cmd , id : ast:: node_id , tcx : ty:: ctxt )
768766 -> ~[ ty:: t ] {
769- let results = dvec :: DVec ( ) ;
767+ let mut results = ~ [ ] ;
770768 let item_doc = lookup_item ( id, cdata. data ) ;
771769 for reader:: tagged_docs( item_doc, tag_impl_trait) |trait_doc| {
772770 results. push ( doc_type ( trait_doc, tcx, cdata) ) ;
773771 }
774- return dvec :: unwrap ( results) ;
772+ return results;
775773}
776774
777775// If the item in question is a trait, returns its set of methods and
778776// their self types. Otherwise, returns none. This overlaps in an
779777// annoying way with get_trait_methods.
780778pub fn get_method_names_if_trait ( intr : @ident_interner , cdata : cmd ,
781779 node_id : ast:: node_id )
782- -> Option < @ DVec < ( ast:: ident , ast:: self_ty_ ) > > {
780+ -> Option < ~ [ ( ast:: ident , ast:: self_ty_ ) ] > {
783781
784782 let item = lookup_item ( node_id, cdata. data ) ;
785783 if item_family ( item) != Trait {
786784 return None ;
787785 }
788786
789- let resulting_methods = @ DVec ( ) ;
787+ let mut resulting_methods = ~ [ ] ;
790788 for reader:: tagged_docs( item, tag_item_trait_method) |method| {
791789 resulting_methods. push (
792790 ( item_name ( intr, method) , get_self_ty ( method) ) ) ;
@@ -823,12 +821,12 @@ pub fn get_static_methods_if_impl(intr: @ident_interner,
823821 return None ;
824822 }
825823
826- let impl_method_ids = DVec ( ) ;
824+ let mut impl_method_ids = ~ [ ] ;
827825 for reader:: tagged_docs( item, tag_item_impl_method) |impl_method_doc| {
828826 impl_method_ids. push ( parse_def_id ( reader:: doc_data ( impl_method_doc) ) ) ;
829827 }
830828
831- let static_impl_methods = DVec ( ) ;
829+ let mut static_impl_methods = ~ [ ] ;
832830 for impl_method_ids. each |impl_method_id| {
833831 let impl_method_doc = lookup_item ( impl_method_id. node , cdata. data ) ;
834832 let family = item_family ( impl_method_doc) ;
@@ -852,7 +850,7 @@ pub fn get_static_methods_if_impl(intr: @ident_interner,
852850 }
853851 }
854852
855- return Some ( dvec :: unwrap ( static_impl_methods) ) ;
853+ return Some ( static_impl_methods) ;
856854}
857855
858856pub fn get_item_attrs( cdata : cmd ,
0 commit comments