@@ -1034,7 +1034,7 @@ impl<'a> MethodDef<'a> {
10341034 // make a series of nested matches, to destructure the
10351035 // structs. This is actually right-to-left, but it shouldn't
10361036 // matter.
1037- for ( arg_expr, pat) in self_args . iter ( ) . zip ( patterns) {
1037+ for ( arg_expr, pat) in iter:: zip ( self_args , patterns) {
10381038 body = cx. expr_match (
10391039 trait_. span ,
10401040 arg_expr. clone ( ) ,
@@ -1351,7 +1351,7 @@ impl<'a> MethodDef<'a> {
13511351 let mut discriminant_test = cx. expr_bool ( sp, true ) ;
13521352
13531353 let mut first_ident = None ;
1354- for ( & ident, self_arg) in vi_idents . iter ( ) . zip ( & self_args) {
1354+ for ( & ident, self_arg) in iter:: zip ( & vi_idents , & self_args) {
13551355 let self_addr = cx. expr_addr_of ( sp, self_arg. clone ( ) ) ;
13561356 let variant_value =
13571357 deriving:: call_intrinsic ( cx, sp, sym:: discriminant_value, vec ! [ self_addr] ) ;
@@ -1571,9 +1571,7 @@ impl<'a> TraitDef<'a> {
15711571 let subpats = self . create_subpatterns ( cx, paths, mutbl, use_temporaries) ;
15721572 let pattern = match * struct_def {
15731573 VariantData :: Struct ( ..) => {
1574- let field_pats = subpats
1575- . into_iter ( )
1576- . zip ( & ident_exprs)
1574+ let field_pats = iter:: zip ( subpats, & ident_exprs)
15771575 . map ( |( pat, & ( sp, ident, ..) ) | {
15781576 if ident. is_none ( ) {
15791577 cx. span_bug ( sp, "a braced struct with unnamed fields in `derive`" ) ;
0 commit comments