@@ -3852,7 +3852,6 @@ fn trans_index(@block_ctxt cx, &ast.span sp, @ast.expr base,
3852
3852
3853
3853
// fail: bad bounds check.
3854
3854
auto fail_res = trans_fail( fail_cx, sp, "bounds check") ;
3855
- fail_res. bcx. build. Br ( next_cx. llbb) ;
3856
3855
3857
3856
auto body = next_cx. build. GEP ( v, vec( C_int ( 0 ) , C_int ( abi. vec_elt_data) ) ) ;
3858
3857
auto elt;
@@ -4916,7 +4915,6 @@ fn trans_check_expr(@block_ctxt cx, @ast.expr e) -> result {
4916
4915
auto fail_res = trans_fail( fail_cx, e. span, expr_str) ;
4917
4916
4918
4917
auto next_cx = new_sub_block_ctxt( cx, "next") ;
4919
- fail_res. bcx. build. Br ( next_cx. llbb) ;
4920
4918
cond_res. bcx. build. CondBr ( cond_res. val,
4921
4919
next_cx. llbb,
4922
4920
fail_cx. llbb) ;
@@ -4929,7 +4927,9 @@ fn trans_fail(@block_ctxt cx, common.span sp, str fail_str) -> result {
4929
4927
auto V_line = sp. lo. line as int;
4930
4928
auto args = vec( V_fail_str , V_filename , C_int ( V_line ) ) ;
4931
4929
4932
- ret trans_upcall( cx, "upcall_fail", args) ;
4930
+ auto sub = trans_upcall( cx, "upcall_fail", args) ;
4931
+ sub. bcx. build. Unreachable ( ) ;
4932
+ ret res( sub. bcx, C_nil ( ) ) ;
4933
4933
}
4934
4934
4935
4935
fn trans_put( @block_ctxt cx, & option. t[ @ast. expr] e) -> result {
0 commit comments