File tree Expand file tree Collapse file tree 2 files changed +13
-20
lines changed Expand file tree Collapse file tree 2 files changed +13
-20
lines changed Original file line number Diff line number Diff line change @@ -544,6 +544,7 @@ TEST_XFAILS_SELF := $(filter-out \
544
544
multiline-comment.rs \
545
545
readalias.rs \
546
546
rec.rs \
547
+ rec-auto.rs \
547
548
rec-tup.rs \
548
549
return-nil.rs \
549
550
tup.rs \
Original file line number Diff line number Diff line change @@ -1547,31 +1547,23 @@ fn load_non_structural(@block_ctxt cx,
1547
1547
}
1548
1548
1549
1549
impure fn trans_log( @block_ctxt cx, @ast. expr e) -> result {
1550
- alt ( e. node) {
1551
- case ( ast. expr_lit( ?lit, _) ) {
1552
- alt ( lit. node) {
1553
- case ( ast. lit_str( _) ) {
1554
- auto sub = trans_expr( cx, e) ;
1555
- auto v = sub. bcx. build. PtrToInt ( sub. val, T_int ( ) ) ;
1556
- ret trans_upcall( sub. bcx,
1557
- "upcall_log_str",
1558
- vec( v) ) ;
1559
- }
1560
1550
1561
- case ( _) {
1562
- auto sub = trans_expr( cx, e) ;
1563
- ret trans_upcall( sub. bcx,
1564
- "upcall_log_int" ,
1565
- vec( sub. val) ) ;
1566
- }
1567
- }
1551
+ auto sub = trans_expr( cx, e) ;
1552
+ auto e_ty = typeck. expr_ty( e) ;
1553
+ alt ( e_ty. struct ) {
1554
+ case ( typeck. ty_str) {
1555
+ auto v = sub. bcx. build. PtrToInt ( sub. val, T_int ( ) ) ;
1556
+ ret trans_upcall( sub. bcx,
1557
+ "upcall_log_str",
1558
+ vec( v) ) ;
1568
1559
}
1569
-
1570
1560
case ( _) {
1571
- auto sub = trans_expr( cx, e) ;
1572
- ret trans_upcall( sub. bcx, "upcall_log_int" , vec( sub. val) ) ;
1561
+ ret trans_upcall( sub. bcx,
1562
+ "upcall_log_int" ,
1563
+ vec( sub. val) ) ;
1573
1564
}
1574
1565
}
1566
+ fail;
1575
1567
}
1576
1568
1577
1569
impure fn trans_check_expr( @block_ctxt cx, @ast. expr e) -> result {
You can’t perform that action at this time.
0 commit comments