mirror of
https://github.com/rust-lang/rust
synced 2024-09-15 22:50:55 +00:00
Remove usages of case(_) { fail; } since the compiler does this automatically
This commit is contained in:
parent
530fe1daea
commit
92a716d862
|
@ -1789,7 +1789,6 @@ fn variant_types(@crate_ctxt cx, &ast.variant v) -> vec[@ty.t] {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case (ty.ty_tag(_, _)) { /* nothing */ }
|
case (ty.ty_tag(_, _)) { /* nothing */ }
|
||||||
case (_) { fail; }
|
|
||||||
}
|
}
|
||||||
ret tys;
|
ret tys;
|
||||||
}
|
}
|
||||||
|
@ -2002,7 +2001,6 @@ fn iter_boxpp(@block_ctxt cx,
|
||||||
j += 1;
|
j += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case (_) { fail; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
variant_cx.build.Br(next_cx.llbb);
|
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));
|
auto et = plain_ty(ty.ty_machine(common.ty_u8));
|
||||||
ret iter_sequence_body(cx, v, et, f, true);
|
ret iter_sequence_body(cx, v, et, f, true);
|
||||||
}
|
}
|
||||||
case (_) { fail; }
|
|
||||||
}
|
}
|
||||||
cx.fcx.ccx.sess.bug("bad type in trans.iter_sequence");
|
cx.fcx.ccx.sess.bug("bad type in trans.iter_sequence");
|
||||||
fail;
|
fail;
|
||||||
|
|
|
@ -1861,9 +1861,6 @@ fn check_assignment(&@fn_ctxt fcx, @ast.expr lhs, @ast.expr rhs)
|
||||||
case (ty.ty_chan(?it)) {
|
case (ty.ty_chan(?it)) {
|
||||||
item_t = it;
|
item_t = it;
|
||||||
}
|
}
|
||||||
case (_) {
|
|
||||||
fail;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
auto rhs_1 = demand_expr(fcx, item_t, rhs_0);
|
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)) {
|
case (ty.ty_port(?it)) {
|
||||||
item_t = it;
|
item_t = it;
|
||||||
}
|
}
|
||||||
case (_) {
|
|
||||||
fail;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
auto lhs_1 = demand_expr(fcx, item_t, lhs_0);
|
auto lhs_1 = demand_expr(fcx, item_t, lhs_0);
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,6 @@ fn fill[T](uint i, uint nelts, uint lo,
|
||||||
fn get[T](vec[cell[T]] elts, uint i) -> T {
|
fn get[T](vec[cell[T]] elts, uint i) -> T {
|
||||||
alt (elts.(i)) {
|
alt (elts.(i)) {
|
||||||
case (option.some[T](?t)) { ret t; }
|
case (option.some[T](?t)) { ret t; }
|
||||||
case (_) { fail; }
|
|
||||||
}
|
}
|
||||||
fail; // FIXME: remove me when exhaustiveness checking works
|
fail; // FIXME: remove me when exhaustiveness checking works
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,7 +176,6 @@ fn contains_key(&K key) -> bool {
|
||||||
fn get(&K key) -> V {
|
fn get(&K key) -> V {
|
||||||
alt (find_common[K, V](hasher, eqer, bkts, nbkts, key)) {
|
alt (find_common[K, V](hasher, eqer, bkts, nbkts, key)) {
|
||||||
case (option.some[V](?val)) { ret val; }
|
case (option.some[V](?val)) { ret val; }
|
||||||
case (_) { fail; }
|
|
||||||
}
|
}
|
||||||
fail; // FIXME: remove me when exhaustiveness checking works
|
fail; // FIXME: remove me when exhaustiveness checking works
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue