@@ -204,11 +204,11 @@ use ext::build::AstBuilder;
204204use codemap:: { self , DUMMY_SP } ;
205205use codemap:: Span ;
206206use diagnostic:: SpanHandler ;
207- use util:: move_map:: MoveMap ;
208207use owned_slice:: OwnedSlice ;
209208use parse:: token:: { intern, InternedString } ;
210209use parse:: token:: special_idents;
211210use ptr:: P ;
211+ use util:: MoveMap ;
212212
213213use self :: ty:: { LifetimeBounds , Path , Ptr , PtrTy , Self_ , Ty } ;
214214
@@ -490,7 +490,7 @@ impl<'a> TraitDef<'a> {
490490
491491 let Generics { mut lifetimes, ty_params, mut where_clause } =
492492 self . generics . to_generics ( cx, self . span , type_ident, generics) ;
493- let mut ty_params = ty_params. into_vec ( ) ;
493+ let mut ty_params: Vec < _ > = ty_params. into ( ) ;
494494
495495 // Copy the lifetimes
496496 lifetimes. extend ( generics. lifetimes . iter ( ) . cloned ( ) ) ;
@@ -516,7 +516,7 @@ impl<'a> TraitDef<'a> {
516516
517517 cx. typaram ( self . span ,
518518 ty_param. ident ,
519- OwnedSlice :: from_vec ( bounds) ,
519+ OwnedSlice :: from ( bounds) ,
520520 None )
521521 } ) ) ;
522522
@@ -528,7 +528,7 @@ impl<'a> TraitDef<'a> {
528528 span : self . span ,
529529 bound_lifetimes : wb. bound_lifetimes . clone ( ) ,
530530 bounded_ty : wb. bounded_ty . clone ( ) ,
531- bounds : OwnedSlice :: from_vec ( wb. bounds . iter ( ) . cloned ( ) . collect ( ) )
531+ bounds : wb. bounds . iter ( ) . cloned ( ) . collect ( )
532532 } )
533533 }
534534 ast:: WherePredicate :: RegionPredicate ( ref rb) => {
@@ -579,7 +579,7 @@ impl<'a> TraitDef<'a> {
579579 span : self . span ,
580580 bound_lifetimes : vec ! [ ] ,
581581 bounded_ty : ty,
582- bounds : OwnedSlice :: from_vec ( bounds) ,
582+ bounds : OwnedSlice :: from ( bounds) ,
583583 } ;
584584
585585 let predicate = ast:: WherePredicate :: BoundPredicate ( predicate) ;
@@ -590,17 +590,17 @@ impl<'a> TraitDef<'a> {
590590
591591 let trait_generics = Generics {
592592 lifetimes : lifetimes,
593- ty_params : OwnedSlice :: from_vec ( ty_params) ,
593+ ty_params : OwnedSlice :: from ( ty_params) ,
594594 where_clause : where_clause
595595 } ;
596596
597597 // Create the reference to the trait.
598598 let trait_ref = cx. trait_ref ( trait_path) ;
599599
600600 // Create the type parameters on the `self` path.
601- let self_ty_params = generics. ty_params . map ( |ty_param| {
601+ let self_ty_params = generics. ty_params . iter ( ) . map ( |ty_param| {
602602 cx. ty_ident ( self . span , ty_param. ident )
603- } ) ;
603+ } ) . collect ( ) ;
604604
605605 let self_lifetimes: Vec < ast:: Lifetime > =
606606 generics. lifetimes
@@ -611,7 +611,7 @@ impl<'a> TraitDef<'a> {
611611 // Create the type of `self`.
612612 let self_type = cx. ty_path (
613613 cx. path_all ( self . span , false , vec ! ( type_ident ) , self_lifetimes,
614- self_ty_params. into_vec ( ) , Vec :: new ( ) ) ) ;
614+ self_ty_params, Vec :: new ( ) ) ) ;
615615
616616 let attr = cx. attribute (
617617 self . span ,
0 commit comments