@@ -1137,11 +1137,11 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
11371137 }
11381138
11391139 fn rebuild_ty_params ( & self ,
1140- ty_params : P < [ hir:: TyParam ] > ,
1140+ ty_params : hir :: HirVec < hir:: TyParam > ,
11411141 lifetime : hir:: Lifetime ,
11421142 region_names : & HashSet < ast:: Name > )
1143- -> P < [ hir:: TyParam ] > {
1144- ty_params. map ( |ty_param| {
1143+ -> hir :: HirVec < hir:: TyParam > {
1144+ ty_params. iter ( ) . map ( |ty_param| {
11451145 let bounds = self . rebuild_ty_param_bounds ( ty_param. bounds . clone ( ) ,
11461146 lifetime,
11471147 region_names) ;
@@ -1152,15 +1152,15 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
11521152 default : ty_param. default . clone ( ) ,
11531153 span : ty_param. span ,
11541154 }
1155- } )
1155+ } ) . collect ( )
11561156 }
11571157
11581158 fn rebuild_ty_param_bounds ( & self ,
11591159 ty_param_bounds : hir:: TyParamBounds ,
11601160 lifetime : hir:: Lifetime ,
11611161 region_names : & HashSet < ast:: Name > )
11621162 -> hir:: TyParamBounds {
1163- ty_param_bounds. map ( |tpb| {
1163+ ty_param_bounds. iter ( ) . map ( |tpb| {
11641164 match tpb {
11651165 & hir:: RegionTyParamBound ( lt) => {
11661166 // FIXME -- it's unclear whether I'm supposed to
@@ -1196,7 +1196,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
11961196 } , modifier)
11971197 }
11981198 }
1199- } )
1199+ } ) . collect ( )
12001200 }
12011201
12021202 fn rebuild_expl_self ( & self ,
@@ -1232,7 +1232,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
12321232 add : & Vec < hir:: Lifetime > ,
12331233 keep : & HashSet < ast:: Name > ,
12341234 remove : & HashSet < ast:: Name > ,
1235- ty_params : P < [ hir:: TyParam ] > ,
1235+ ty_params : hir :: HirVec < hir:: TyParam > ,
12361236 where_clause : hir:: WhereClause )
12371237 -> hir:: Generics {
12381238 let mut lifetimes = Vec :: new ( ) ;
@@ -1482,10 +1482,10 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
14821482 }
14831483 }
14841484 }
1485- let new_types = data. types . map ( |t| {
1485+ let new_types = data. types . iter ( ) . map ( |t| {
14861486 self . rebuild_arg_ty_or_output ( & * * t, lifetime, anon_nums, region_names)
1487- } ) ;
1488- let new_bindings = data. bindings . map ( |b| {
1487+ } ) . collect ( ) ;
1488+ let new_bindings = data. bindings . iter ( ) . map ( |b| {
14891489 hir:: TypeBinding {
14901490 id : b. id ,
14911491 name : b. name ,
@@ -1495,7 +1495,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
14951495 region_names) ,
14961496 span : b. span
14971497 }
1498- } ) ;
1498+ } ) . collect ( ) ;
14991499 hir:: AngleBracketedParameters ( hir:: AngleBracketedParameterData {
15001500 lifetimes : new_lts. into ( ) ,
15011501 types : new_types,
0 commit comments