@@ -90,7 +90,6 @@ use std::cell::{Cell, RefCell};
90
90
use std:: char:: from_u32;
91
91
use std:: fmt;
92
92
use syntax:: ast;
93
- use syntax:: owned_slice:: OwnedSlice ;
94
93
use syntax:: codemap:: { self , Pos , Span } ;
95
94
use syntax:: parse:: token;
96
95
use syntax:: ptr:: P ;
@@ -1154,10 +1153,10 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
1154
1153
}
1155
1154
1156
1155
fn rebuild_ty_params ( & self ,
1157
- ty_params : OwnedSlice < hir:: TyParam > ,
1156
+ ty_params : P < [ hir:: TyParam ] > ,
1158
1157
lifetime : hir:: Lifetime ,
1159
1158
region_names : & HashSet < ast:: Name > )
1160
- -> OwnedSlice < hir:: TyParam > {
1159
+ -> P < [ hir:: TyParam ] > {
1161
1160
ty_params. map ( |ty_param| {
1162
1161
let bounds = self . rebuild_ty_param_bounds ( ty_param. bounds . clone ( ) ,
1163
1162
lifetime,
@@ -1173,10 +1172,10 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
1173
1172
}
1174
1173
1175
1174
fn rebuild_ty_param_bounds ( & self ,
1176
- ty_param_bounds : OwnedSlice < hir:: TyParamBound > ,
1175
+ ty_param_bounds : hir:: TyParamBounds ,
1177
1176
lifetime : hir:: Lifetime ,
1178
1177
region_names : & HashSet < ast:: Name > )
1179
- -> OwnedSlice < hir:: TyParamBound > {
1178
+ -> hir:: TyParamBounds {
1180
1179
ty_param_bounds. map ( |tpb| {
1181
1180
match tpb {
1182
1181
& hir:: RegionTyParamBound ( lt) => {
@@ -1249,13 +1248,13 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
1249
1248
add : & Vec < hir:: Lifetime > ,
1250
1249
keep : & HashSet < ast:: Name > ,
1251
1250
remove : & HashSet < ast:: Name > ,
1252
- ty_params : OwnedSlice < hir:: TyParam > ,
1251
+ ty_params : P < [ hir:: TyParam ] > ,
1253
1252
where_clause : hir:: WhereClause )
1254
1253
-> hir:: Generics {
1255
1254
let mut lifetimes = Vec :: new ( ) ;
1256
1255
for lt in add {
1257
1256
lifetimes. push ( hir:: LifetimeDef { lifetime : * lt,
1258
- bounds : Vec :: new ( ) } ) ;
1257
+ bounds : hir :: HirVec :: new ( ) } ) ;
1259
1258
}
1260
1259
for lt in & generics. lifetimes {
1261
1260
if keep. contains ( & lt. lifetime . name ) ||
@@ -1264,7 +1263,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
1264
1263
}
1265
1264
}
1266
1265
hir:: Generics {
1267
- lifetimes : lifetimes,
1266
+ lifetimes : lifetimes. into ( ) ,
1268
1267
ty_params : ty_params,
1269
1268
where_clause : where_clause,
1270
1269
}
@@ -1275,7 +1274,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
1275
1274
lifetime : hir:: Lifetime ,
1276
1275
anon_nums : & HashSet < u32 > ,
1277
1276
region_names : & HashSet < ast:: Name > )
1278
- -> Vec < hir:: Arg > {
1277
+ -> hir :: HirVec < hir:: Arg > {
1279
1278
let mut new_inputs = Vec :: new ( ) ;
1280
1279
for arg in inputs {
1281
1280
let new_ty = self . rebuild_arg_ty_or_output ( & * arg. ty , lifetime,
@@ -1287,7 +1286,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
1287
1286
} ;
1288
1287
new_inputs. push ( possibly_new_arg) ;
1289
1288
}
1290
- new_inputs
1289
+ new_inputs. into ( )
1291
1290
}
1292
1291
1293
1292
fn rebuild_output ( & self , ty : & hir:: FunctionRetTy ,
@@ -1514,7 +1513,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
1514
1513
}
1515
1514
} ) ;
1516
1515
hir:: AngleBracketedParameters ( hir:: AngleBracketedParameterData {
1517
- lifetimes : new_lts,
1516
+ lifetimes : new_lts. into ( ) ,
1518
1517
types : new_types,
1519
1518
bindings : new_bindings,
1520
1519
} )
@@ -1530,7 +1529,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
1530
1529
hir:: Path {
1531
1530
span : path. span ,
1532
1531
global : path. global ,
1533
- segments : new_segs
1532
+ segments : new_segs. into ( )
1534
1533
}
1535
1534
}
1536
1535
}
0 commit comments