From cd8cf44d1d876c3eb0206899e46c007171dbe32e Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Thu, 28 Apr 2011 18:11:00 -0700 Subject: [PATCH] Make the no-growth path (previously never exercised) in rustc *work*. --- src/comp/middle/trans.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 14eb2e08d89..bd6b4afbe22 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -7449,8 +7449,6 @@ fn trans_vec_append_glue(@local_ctxt cx) { auto llnew_vec = vi2p(bcx, llnew_vec_res.val, T_opaque_vec_ptr()); - put_vec_fill(bcx, llnew_vec, C_int(0)); - auto copy_dst_cx = new_sub_block_ctxt(bcx, "copy new <- dst"); auto copy_src_cx = new_sub_block_ctxt(bcx, "copy new <- src"); @@ -7494,6 +7492,7 @@ fn take_one(ValueRef elt_tydesc, } // Copy any dst elements in, omitting null if doing str. + put_vec_fill(copy_dst_cx, llnew_vec, C_int(0)); auto n_bytes = vec_fill_adjusted(copy_dst_cx, lldst_vec, llskipnull); copy_dst_cx = copy_elts(copy_dst_cx, llelt_tydesc,