Skip to content

Commit 7125b01

Browse files
committed
---
yaml --- r: 4369 b: refs/heads/master c: ea81c03 h: refs/heads/master i: 4367: 16f7309 v: v3
1 parent 8eade46 commit 7125b01

File tree

3 files changed

+1
-16
lines changed

3 files changed

+1
-16
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: d08c0f0ec12d5fb238a3a9992e2da4fadcf9d1d4
2+
refs/heads/master: ea81c03960264bf590cd99ed2b662243e3db7a7c

trunk/src/comp/middle/trans.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3592,18 +3592,6 @@ fn trans_if(cx: &@block_ctxt, cond: &@ast::expr, thn: &ast::blk,
35923592
els: &option::t[@ast::expr], id: ast::node_id,
35933593
output: &out_method) -> result {
35943594
let cond_res = trans_expr(cx, cond);
3595-
3596-
if (ty::type_is_bot(bcx_tcx(cx), ty::expr_ty(bcx_tcx(cx), cond))) {
3597-
// No need to generate code for comparison,
3598-
// since the cond diverges.
3599-
if (!cx.build.is_terminated()) {
3600-
ret rslt(cx, cx.build.Unreachable());
3601-
}
3602-
else {
3603-
ret rslt(cx, C_nil());
3604-
}
3605-
}
3606-
36073595
let then_cx = new_scope_block_ctxt(cx, "then");
36083596
let then_res = trans_block(then_cx, thn, output);
36093597
let else_cx = new_scope_block_ctxt(cx, "else");

trunk/src/test/run-fail/if-cond-bot.rs

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)