File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -5393,25 +5393,10 @@ fn trans_block(@block_ctxt cx, &ast.block b) -> result {
5393
5393
5394
5394
auto r_ty = ty. expr_ty( e) ;
5395
5395
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) ) {
5406
5397
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.
5415
5400
auto res_alloca = alloc_ty( bcx, r_ty) ;
5416
5401
bcx = res_alloca. bcx;
5417
5402
auto res_copy = copy_ty( bcx, INIT ,
You can’t perform that action at this time.
0 commit comments