Skip to content

Commit 8a2078c

Browse files
committed
---
yaml --- r: 1962 b: refs/heads/master c: 524e803 h: refs/heads/master v: v3
1 parent 4cc4480 commit 8a2078c

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
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: f05d3c516b085bd489893d7885be0bb687a786f7
2+
refs/heads/master: 524e80358254575bb699756c405050da6c920e28

trunk/src/comp/middle/trans.rs

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5393,25 +5393,10 @@ fn trans_block(@block_ctxt cx, &ast.block b) -> result {
53935393

53945394
auto r_ty = ty.expr_ty(e);
53955395

5396-
fn is_nil(@ty.t r_ty) -> bool {
5397-
alt (r_ty.struct) {
5398-
case (ty.ty_nil) {
5399-
ret true;
5400-
}
5401-
case (_) {
5402-
ret false;
5403-
}
5404-
}
5405-
}
5396+
if (ty.type_is_boxed(r_ty)) {
54065397

5407-
// FIXME: This is a temporary hack to prevent compile
5408-
// failures. There's some expression variant that claims
5409-
// to be ty_nil but but does not translate to T_nil. Need
5410-
// to hunt it down. Of course, if we're talking about nil,
5411-
// do we really want to do this whole business anyway?
5412-
if (!is_nil(r_ty)) {
5413-
// This alloca is declared at the function level, above
5414-
// the block scope
5398+
// Create an alloca up in the llallocas block to hold the
5399+
// expression result.
54155400
auto res_alloca = alloc_ty(bcx, r_ty);
54165401
bcx = res_alloca.bcx;
54175402
auto res_copy = copy_ty(bcx, INIT,

0 commit comments

Comments
 (0)