@@ -1153,11 +1153,11 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
11531153 }
11541154
11551155 fn rebuild_ty_params ( & self ,
1156- ty_params : P < [ hir:: TyParam ] > ,
1156+ ty_params : hir :: HirVec < hir:: TyParam > ,
11571157 lifetime : hir:: Lifetime ,
11581158 region_names : & HashSet < ast:: Name > )
1159- -> P < [ hir:: TyParam ] > {
1160- ty_params. map ( |ty_param| {
1159+ -> hir :: HirVec < hir:: TyParam > {
1160+ ty_params. iter ( ) . map ( |ty_param| {
11611161 let bounds = self . rebuild_ty_param_bounds ( ty_param. bounds . clone ( ) ,
11621162 lifetime,
11631163 region_names) ;
@@ -1168,15 +1168,15 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
11681168 default : ty_param. default . clone ( ) ,
11691169 span : ty_param. span ,
11701170 }
1171- } )
1171+ } ) . collect ( )
11721172 }
11731173
11741174 fn rebuild_ty_param_bounds ( & self ,
11751175 ty_param_bounds : hir:: TyParamBounds ,
11761176 lifetime : hir:: Lifetime ,
11771177 region_names : & HashSet < ast:: Name > )
11781178 -> hir:: TyParamBounds {
1179- ty_param_bounds. map ( |tpb| {
1179+ ty_param_bounds. iter ( ) . map ( |tpb| {
11801180 match tpb {
11811181 & hir:: RegionTyParamBound ( lt) => {
11821182 // FIXME -- it's unclear whether I'm supposed to
@@ -1212,7 +1212,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
12121212 } , modifier)
12131213 }
12141214 }
1215- } )
1215+ } ) . collect ( )
12161216 }
12171217
12181218 fn rebuild_expl_self ( & self ,
@@ -1248,7 +1248,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
12481248 add : & Vec < hir:: Lifetime > ,
12491249 keep : & HashSet < ast:: Name > ,
12501250 remove : & HashSet < ast:: Name > ,
1251- ty_params : P < [ hir:: TyParam ] > ,
1251+ ty_params : hir :: HirVec < hir:: TyParam > ,
12521252 where_clause : hir:: WhereClause )
12531253 -> hir:: Generics {
12541254 let mut lifetimes = Vec :: new ( ) ;
@@ -1498,10 +1498,10 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
14981498 }
14991499 }
15001500 }
1501- let new_types = data. types . map ( |t| {
1501+ let new_types = data. types . iter ( ) . map ( |t| {
15021502 self . rebuild_arg_ty_or_output ( & * * t, lifetime, anon_nums, region_names)
1503- } ) ;
1504- let new_bindings = data. bindings . map ( |b| {
1503+ } ) . collect ( ) ;
1504+ let new_bindings = data. bindings . iter ( ) . map ( |b| {
15051505 hir:: TypeBinding {
15061506 id : b. id ,
15071507 name : b. name ,
@@ -1511,7 +1511,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
15111511 region_names) ,
15121512 span : b. span
15131513 }
1514- } ) ;
1514+ } ) . collect ( ) ;
15151515 hir:: AngleBracketedParameters ( hir:: AngleBracketedParameterData {
15161516 lifetimes : new_lts. into ( ) ,
15171517 types : new_types,
0 commit comments