@@ -1153,11 +1153,11 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
1153
1153
}
1154
1154
1155
1155
fn rebuild_ty_params ( & self ,
1156
- ty_params : P < [ hir:: TyParam ] > ,
1156
+ ty_params : hir :: HirVec < hir:: TyParam > ,
1157
1157
lifetime : hir:: Lifetime ,
1158
1158
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| {
1161
1161
let bounds = self . rebuild_ty_param_bounds ( ty_param. bounds . clone ( ) ,
1162
1162
lifetime,
1163
1163
region_names) ;
@@ -1168,15 +1168,15 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
1168
1168
default : ty_param. default . clone ( ) ,
1169
1169
span : ty_param. span ,
1170
1170
}
1171
- } )
1171
+ } ) . collect ( )
1172
1172
}
1173
1173
1174
1174
fn rebuild_ty_param_bounds ( & self ,
1175
1175
ty_param_bounds : hir:: TyParamBounds ,
1176
1176
lifetime : hir:: Lifetime ,
1177
1177
region_names : & HashSet < ast:: Name > )
1178
1178
-> hir:: TyParamBounds {
1179
- ty_param_bounds. map ( |tpb| {
1179
+ ty_param_bounds. iter ( ) . map ( |tpb| {
1180
1180
match tpb {
1181
1181
& hir:: RegionTyParamBound ( lt) => {
1182
1182
// FIXME -- it's unclear whether I'm supposed to
@@ -1212,7 +1212,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
1212
1212
} , modifier)
1213
1213
}
1214
1214
}
1215
- } )
1215
+ } ) . collect ( )
1216
1216
}
1217
1217
1218
1218
fn rebuild_expl_self ( & self ,
@@ -1248,7 +1248,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
1248
1248
add : & Vec < hir:: Lifetime > ,
1249
1249
keep : & HashSet < ast:: Name > ,
1250
1250
remove : & HashSet < ast:: Name > ,
1251
- ty_params : P < [ hir:: TyParam ] > ,
1251
+ ty_params : hir :: HirVec < hir:: TyParam > ,
1252
1252
where_clause : hir:: WhereClause )
1253
1253
-> hir:: Generics {
1254
1254
let mut lifetimes = Vec :: new ( ) ;
@@ -1498,10 +1498,10 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
1498
1498
}
1499
1499
}
1500
1500
}
1501
- let new_types = data. types . map ( |t| {
1501
+ let new_types = data. types . iter ( ) . map ( |t| {
1502
1502
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| {
1505
1505
hir:: TypeBinding {
1506
1506
id : b. id ,
1507
1507
name : b. name ,
@@ -1511,7 +1511,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
1511
1511
region_names) ,
1512
1512
span : b. span
1513
1513
}
1514
- } ) ;
1514
+ } ) . collect ( ) ;
1515
1515
hir:: AngleBracketedParameters ( hir:: AngleBracketedParameterData {
1516
1516
lifetimes : new_lts. into ( ) ,
1517
1517
types : new_types,
0 commit comments