diff options
| author | Patrick Walton <[email protected]> | 2010-11-18 14:17:17 -0800 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2010-11-18 14:19:06 -0800 |
| commit | 77ff12c435aeb6181ee2678a526b6f6ea3831938 (patch) | |
| tree | 499fd7149a5fc2a9f0f8c9201b4e2e21c4231f26 /src/lib | |
| parent | Update frame logic to be compatible with SysV x86 ABI. Improves diagnostics. (diff) | |
| download | rust-77ff12c435aeb6181ee2678a526b6f6ea3831938.tar.xz rust-77ff12c435aeb6181ee2678a526b6f6ea3831938.zip | |
rustboot: Don't use walk to traverse statements in type.ml; fixes redundant checking, improves diagnostics. Also report untyped slots.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/_uint.rs | 1 | ||||
| -rw-r--r-- | src/lib/deque.rs | 1 | ||||
| -rw-r--r-- | src/lib/list.rs | 4 | ||||
| -rw-r--r-- | src/lib/map.rs | 2 | ||||
| -rw-r--r-- | src/lib/option.rs | 2 |
5 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/_uint.rs b/src/lib/_uint.rs index 7fa4ea02..79b5fa24 100644 --- a/src/lib/_uint.rs +++ b/src/lib/_uint.rs @@ -55,6 +55,7 @@ fn to_str(mutable uint n, uint radix) -> str case (14u) { ret 'e'; } case (15u) { ret 'f'; } } + fail; } if (n == 0u) { ret "0"; } diff --git a/src/lib/deque.rs b/src/lib/deque.rs index 4a4aab4e..16023457 100644 --- a/src/lib/deque.rs +++ b/src/lib/deque.rs @@ -53,6 +53,7 @@ fn create[T]() -> t[T] { case (option.some[T](?t)) { ret t; } case (_) { fail; } } + fail; // FIXME: remove me when exhaustiveness checking works } obj deque[T](mutable uint nelts, diff --git a/src/lib/list.rs b/src/lib/list.rs index c6a67c71..c4661940 100644 --- a/src/lib/list.rs +++ b/src/lib/list.rs @@ -24,6 +24,8 @@ fn foldl[T,U](&list[T] ls, &U u, fn(&T t, U u) -> U f) -> U { ret u; } } + + fail; // TODO: remove me when exhaustiveness checking works } fn find[T,U](&list[T] ls, @@ -45,6 +47,8 @@ fn find[T,U](&list[T] ls, ret none[U]; } } + + fail; // TODO: remove me when exhaustiveness checking works } fn length[T](&list[T] ls) -> uint { diff --git a/src/lib/map.rs b/src/lib/map.rs index b20fd9c5..7f760b65 100644 --- a/src/lib/map.rs +++ b/src/lib/map.rs @@ -176,6 +176,7 @@ fn mk_hashmap[K, V](&hashfn[K] hasher, &eqfn[K] eqer) -> hashmap[K, V] { case (option.some[V](_)) { ret true; } case (_) { ret false; } } + fail; // FIXME: remove me when exhaustiveness checking works } fn get(&K key) -> V { @@ -183,6 +184,7 @@ fn mk_hashmap[K, V](&hashfn[K] hasher, &eqfn[K] eqer) -> hashmap[K, V] { case (option.some[V](?val)) { ret val; } case (_) { fail; } } + fail; // FIXME: remove me when exhaustiveness checking works } fn find(&K key) -> option.t[V] { diff --git a/src/lib/option.rs b/src/lib/option.rs index dbf08b3e..25f82b52 100644 --- a/src/lib/option.rs +++ b/src/lib/option.rs @@ -16,6 +16,7 @@ fn get[T](&t[T] opt) -> T { fail; } } + fail; // FIXME: remove me when exhaustiveness checking works } fn map[T, U](&operator[T, U] f, &t[T] opt) -> t[U] { @@ -27,6 +28,7 @@ fn map[T, U](&operator[T, U] f, &t[T] opt) -> t[U] { ret none[U]; } } + fail; // FIXME: remove me when exhaustiveness checking works } // Local Variables: |