Skip to content

Commit 30b5f85

Browse files
committed
Merge remote-tracking branch 'graydon/master'
2 parents e7c8019 + 031529e commit 30b5f85

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/comp/middle/trans.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5626,7 +5626,9 @@ fn alloc_ty(cx: &@block_ctxt, t: &ty::t) -> result {
56265626
// past caller conventions and may well make sense again,
56275627
// so we leave it as-is.
56285628

5629-
bcx = gc::add_gc_root(bcx, val, t);
5629+
if (bcx_tcx(cx).sess.get_opts().do_gc) {
5630+
bcx = gc::add_gc_root(bcx, val, t);
5631+
}
56305632

56315633
ret rslt(cx, val);
56325634
}

0 commit comments

Comments
 (0)