Revert "Remove usages of case(_) { fail; } since the compiler does this automatically". When we have exhaustiveness checking, "case(_) { fail; }" will be useful to silence warnings.
This reverts commit 92a716d862.
This commit is contained in:
parent
6623597c18
commit
bcf04e253f
4 changed files with 11 additions and 0 deletions
|
|
@ -47,6 +47,7 @@ fn create[T]() -> t[T] {
|
|||
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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,6 +176,7 @@ fn mk_hashmap[K, V](&hashfn[K] hasher, &eqfn[K] eqer) -> hashmap[K, V] {
|
|||
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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue