rustc: Work around leak when translating interior vectors. Un-XFAIL interior-vec.rs.

This commit is contained in:
Patrick Walton 2011-06-16 15:07:21 -07:00
parent 5b341443da
commit d90ad442b4
2 changed files with 6 additions and 7 deletions

View File

@ -3456,12 +3456,16 @@ mod ivec {
cx.fcx.lcx.ccx.tcx.sess.bug("non-istr/ivec in trans_append"); cx.fcx.lcx.ccx.tcx.sess.bug("non-istr/ivec in trans_append");
} }
} }
// Gather the various type descriptors we'll need. // Gather the various type descriptors we'll need.
auto rslt = get_tydesc(cx, t, false, none); // FIXME (issue #511): This is needed to prevent a leak.
auto no_tydesc_info = none;
auto rslt = get_tydesc(cx, t, false, no_tydesc_info);
auto vec_tydesc = rslt.val; auto vec_tydesc = rslt.val;
auto bcx = rslt.bcx; auto bcx = rslt.bcx;
rslt = get_tydesc(bcx, unit_ty, false, none); rslt = get_tydesc(bcx, unit_ty, false, no_tydesc_info);
auto unit_tydesc = rslt.val; auto unit_tydesc = rslt.val;
bcx = rslt.bcx; bcx = rslt.bcx;

View File

@ -1,9 +1,4 @@
// xfail-stage0 // xfail-stage0
// xfail-stage1
// xfail-stage2
// xfail-stage3
// works, but leaks in the compiler :(
import rusti::ivec_len; import rusti::ivec_len;