Skip to content

Commit a1aad28

Browse files
committed
rustc: Use the right block context to generate unary operands. std.rc compiles now. For realz.
1 parent 8e597b2 commit a1aad28

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/comp/middle/trans.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2348,15 +2348,15 @@ fn trans_unary(@block_ctxt cx, ast.unop op,
23482348
alt (op) {
23492349
case (ast.bitnot) {
23502350
sub = autoderef(sub.bcx, sub.val, ty.expr_ty(e));
2351-
ret res(sub.bcx, cx.build.Not(sub.val));
2351+
ret res(sub.bcx, sub.bcx.build.Not(sub.val));
23522352
}
23532353
case (ast.not) {
23542354
sub = autoderef(sub.bcx, sub.val, ty.expr_ty(e));
2355-
ret res(sub.bcx, cx.build.Not(sub.val));
2355+
ret res(sub.bcx, sub.bcx.build.Not(sub.val));
23562356
}
23572357
case (ast.neg) {
23582358
sub = autoderef(sub.bcx, sub.val, ty.expr_ty(e));
2359-
ret res(sub.bcx, cx.build.Neg(sub.val));
2359+
ret res(sub.bcx, sub.bcx.build.Neg(sub.val));
23602360
}
23612361
case (ast.box) {
23622362
auto e_ty = ty.expr_ty(e);

0 commit comments

Comments
 (0)