diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2012-02-15 09:40:42 +0100 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2012-02-15 15:47:42 +0100 |
| commit | 67cc89f38d2e75cb0dcd6303fbe4bb4f659277a7 (patch) | |
| tree | 99caacd6c05c72beb28e73a9aa759b5db1d88114 /src/test/run-fail | |
| parent | 4b63826050dfc579b9ac65a6b72ad0ca6f6b51fc (diff) | |
| download | rust-67cc89f38d2e75cb0dcd6303fbe4bb4f659277a7.tar.gz rust-67cc89f38d2e75cb0dcd6303fbe4bb4f659277a7.zip | |
Rewrite exhaustiveness checker
Issue #352
Closes #1720
The old checker would happily accept things like 'alt x { @some(a) { a } }'.
It now properly descends into patterns, checks exhaustiveness of booleans,
and complains when number/string patterns aren't exhaustive.
Diffstat (limited to 'src/test/run-fail')
| -rw-r--r-- | src/test/run-fail/unwind-alt.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/run-fail/unwind-alt.rs b/src/test/run-fail/unwind-alt.rs index 741a7eb4975..1cd512cfc41 100644 --- a/src/test/run-fail/unwind-alt.rs +++ b/src/test/run-fail/unwind-alt.rs @@ -4,7 +4,7 @@ fn test_box() { @0; } fn test_str() { - let res = alt false { true { "happy" } }; + let res = alt check false { true { "happy" } }; assert res == "happy"; } fn main() { |
