base::iter_structural_ty: tuples
This commit is contained in:
parent
ca450e345f
commit
68b3f0d8a4
@ -689,10 +689,11 @@ fn iter_variant(cx: block, a_tup: ValueRef,
|
|||||||
cx = tvec::iter_vec_raw(cx, base, t, len, f);
|
cx = tvec::iter_vec_raw(cx, base, t, len, f);
|
||||||
}
|
}
|
||||||
ty::ty_tup(args) => {
|
ty::ty_tup(args) => {
|
||||||
for vec::eachi(args) |i, arg| {
|
let repr = adt::represent_type(cx.ccx(), t);
|
||||||
let llfld_a = GEPi(cx, av, [0u, i]);
|
for vec::eachi(args) |i, arg| {
|
||||||
cx = f(cx, llfld_a, *arg);
|
let llfld_a = adt::trans_GEP(cx, &repr, av, 0, i);
|
||||||
}
|
cx = f(cx, llfld_a, *arg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ty::ty_enum(tid, ref substs) => {
|
ty::ty_enum(tid, ref substs) => {
|
||||||
let variants = ty::enum_variants(cx.tcx(), tid);
|
let variants = ty::enum_variants(cx.tcx(), tid);
|
||||||
|
Loading…
Reference in New Issue
Block a user