Skip to content

Commit cd8cf44

Browse files
committed
Make the no-growth path (previously never exercised) in rustc *work*.
1 parent bcad524 commit cd8cf44

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/comp/middle/trans.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7449,8 +7449,6 @@ fn trans_vec_append_glue(@local_ctxt cx) {
74497449
auto llnew_vec = vi2p(bcx, llnew_vec_res.val,
74507450
T_opaque_vec_ptr());
74517451

7452-
put_vec_fill(bcx, llnew_vec, C_int(0));
7453-
74547452
auto copy_dst_cx = new_sub_block_ctxt(bcx, "copy new <- dst");
74557453
auto copy_src_cx = new_sub_block_ctxt(bcx, "copy new <- src");
74567454

@@ -7494,6 +7492,7 @@ fn trans_vec_append_glue(@local_ctxt cx) {
74947492
}
74957493

74967494
// Copy any dst elements in, omitting null if doing str.
7495+
put_vec_fill(copy_dst_cx, llnew_vec, C_int(0));
74977496
auto n_bytes = vec_fill_adjusted(copy_dst_cx, lldst_vec, llskipnull);
74987497
copy_dst_cx = copy_elts(copy_dst_cx,
74997498
llelt_tydesc,

0 commit comments

Comments
 (0)