Remove usages of case(_) { fail; } since the compiler does this automatically

This commit is contained in:
Brian Anderson 2011-03-15 18:45:56 -04:00 committed by Graydon Hoare
parent 530fe1daea
commit 92a716d862
4 changed files with 0 additions and 11 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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
}

View file

@ -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
}