@@ -17,6 +17,7 @@ use middle::typeck;
17
17
use util:: ppaux:: { Repr , ty_to_str} ;
18
18
use util:: ppaux:: UserString ;
19
19
20
+ use core:: iterator:: IteratorUtil ;
20
21
use core:: vec;
21
22
use syntax:: ast:: * ;
22
23
use syntax:: attr:: attrs_contains_name;
@@ -268,7 +269,7 @@ pub fn check_expr(e: @expr, cx: Context, v: visit::vt<Context>) {
268
269
ts. repr( cx. tcx) ,
269
270
type_param_defs. repr( cx. tcx) ) ;
270
271
}
271
- for vec :: each2 ( * * ts , * type_param_defs) | & ty, type_param_def| {
272
+ for ts . iter ( ) . zip ( type_param_defs. iter ( ) ) . advance | ( & ty, type_param_def) | {
272
273
check_bounds( cx, type_parameter_id, e. span, ty, type_param_def)
273
274
}
274
275
}
@@ -309,7 +310,7 @@ fn check_ty(aty: @Ty, cx: Context, v: visit::vt<Context>) {
309
310
let did = ast_util:: def_id_of_def( cx. tcx. def_map. get_copy( & id) ) ;
310
311
let type_param_defs =
311
312
ty:: lookup_item_type( cx. tcx, did) . generics. type_param_defs;
312
- for vec :: each2 ( * * ts , * type_param_defs) | & ty, type_param_def| {
313
+ for ts . iter ( ) . zip ( type_param_defs. iter ( ) ) . advance | ( & ty, type_param_def) | {
313
314
check_bounds( cx, aty. id, aty. span, ty, type_param_def)
314
315
}
315
316
}
0 commit comments