diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index bc43185a799..aede3110fe0 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -1789,7 +1789,6 @@ fn variant_types(@crate_ctxt cx, &ast.variant v) -> vec[@ty.t] { } } case (ty.ty_tag(_, _)) { /* nothing */ } - case (_) { fail; } } ret tys; } @@ -2002,7 +2001,6 @@ fn iter_boxpp(@block_ctxt cx, j += 1; } } - case (_) { fail; } } variant_cx.build.Br(next_cx.llbb); @@ -2169,7 +2167,6 @@ fn iter_sequence_body(@block_ctxt cx, auto et = plain_ty(ty.ty_machine(common.ty_u8)); ret iter_sequence_body(cx, v, et, f, true); } - case (_) { fail; } } cx.fcx.ccx.sess.bug("bad type in trans.iter_sequence"); fail; diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs index c849483e8ad..75d6a8fff61 100644 --- a/src/comp/middle/typeck.rs +++ b/src/comp/middle/typeck.rs @@ -1861,9 +1861,6 @@ fn check_assignment(&@fn_ctxt fcx, @ast.expr lhs, @ast.expr rhs) case (ty.ty_chan(?it)) { item_t = it; } - case (_) { - fail; - } } auto rhs_1 = demand_expr(fcx, item_t, rhs_0); @@ -1884,9 +1881,6 @@ fn check_assignment(&@fn_ctxt fcx, @ast.expr lhs, @ast.expr rhs) case (ty.ty_port(?it)) { item_t = it; } - case (_) { - fail; - } } auto lhs_1 = demand_expr(fcx, item_t, lhs_0); diff --git a/src/lib/deque.rs b/src/lib/deque.rs index 776f82e99fe..704e6749300 100644 --- a/src/lib/deque.rs +++ b/src/lib/deque.rs @@ -47,7 +47,6 @@ fn fill[T](uint i, uint nelts, uint lo, fn get[T](vec[cell[T]] elts, uint i) -> T { alt (elts.(i)) { case (option.some[T](?t)) { ret t; } - case (_) { fail; } } fail; // FIXME: remove me when exhaustiveness checking works } diff --git a/src/lib/map.rs b/src/lib/map.rs index f22faaca719..d8e24314086 100644 --- a/src/lib/map.rs +++ b/src/lib/map.rs @@ -176,7 +176,6 @@ fn contains_key(&K key) -> bool { fn get(&K key) -> V { alt (find_common[K, V](hasher, eqer, bkts, nbkts, key)) { case (option.some[V](?val)) { ret val; } - case (_) { fail; } } fail; // FIXME: remove me when exhaustiveness checking works }