Skip to content

Commit b3d1f0d

Browse files
committed
---
yaml --- r: 4892 b: refs/heads/master c: 0f1f5e6 h: refs/heads/master v: v3
1 parent c0cc1eb commit b3d1f0d

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: fd8ca2cf5d11dac095bc9153bd32b442ac481cb1
2+
refs/heads/master: 0f1f5e67ea13eb9ac19a88dfc1cd4894450ed879

trunk/src/comp/middle/trans.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,10 @@ fn make_drop_glue(cx: &@block_ctxt, v0: ValueRef, t: ty::t) {
14261426
let rslt = iter_structural_ty(cx, v1, t, drop_ty);
14271427
maybe_free_ivec_heap_part(rslt.bcx, v1, tm.ty)
14281428
}
1429+
ty::ty_istr. {
1430+
maybe_free_ivec_heap_part(cx, v0,
1431+
ty::mk_mach(ccx.tcx, ast::ty_u8))
1432+
}
14291433
ty::ty_box(_) { decr_refcnt_maybe_free(cx, v0, v0, t) }
14301434
ty::ty_uniq(_) { trans_shared_free(cx, cx.build.Load(v0)) }
14311435
ty::ty_obj(_) {

trunk/src/test/run-pass/istr.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ fn test_heap_lit() {
1111
~"a big string";
1212
}
1313

14+
fn test_heap_assign() {
15+
let s: istr;
16+
s = ~"AAAA";
17+
}
18+
1419
fn main() {
1520
test_stack_assign();
1621
test_heap_lit();
22+
test_heap_assign();
1723
}

0 commit comments

Comments
 (0)