diff options
| author | Graydon Hoare <[email protected]> | 2010-12-02 14:50:00 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-12-02 14:50:00 -0800 |
| commit | de9fc72cb458c28505b2e9c1d4a2bc6d3a4b0986 (patch) | |
| tree | b90e02b642d85fbbe5f743fc61e1e98bd28c0224 /src/test | |
| parent | Typecheck the box and deref unops properly. (diff) | |
| download | rust-de9fc72cb458c28505b2e9c1d4a2bc6d3a4b0986.tar.xz rust-de9fc72cb458c28505b2e9c1d4a2bc6d3a4b0986.zip | |
Add test for non-exhaustive match failure.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-fail/non-exhaustive-match.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/run-fail/non-exhaustive-match.rs b/src/test/run-fail/non-exhaustive-match.rs new file mode 100644 index 00000000..eb533ef3 --- /dev/null +++ b/src/test/run-fail/non-exhaustive-match.rs @@ -0,0 +1,15 @@ +// -*- rust -*- + +// error-pattern:non-exhaustive match failure + +tag t { + a; + b; +} + +fn main() { + auto x = a; + alt (x) { + case (b) { } + } +} |