Skip to content

Commit 1eaddb7

Browse files
committed
Properly handle 'put;' in trans
Closes #947
1 parent 8c85745 commit 1eaddb7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/comp/middle/trans.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -4470,7 +4470,9 @@ fn trans_put(in_cx: @block_ctxt, e: option::t<@ast::expr>) -> result {
44704470
let dummy_retslot = alloca(bcx, T_nil());
44714471
let llargs: [ValueRef] = [dummy_retslot, cx.fcx.lltaskptr, llenv];
44724472
alt e {
4473-
none. { }
4473+
none. {
4474+
llargs += [C_null(T_ptr(T_nil()))];
4475+
}
44744476
some(x) {
44754477
let e_ty = ty::expr_ty(bcx_tcx(cx), x);
44764478
let arg = {mode: ast::by_ref, ty: e_ty};

0 commit comments

Comments
 (0)