Add test for non-exhaustive match failure.

This commit is contained in:
Graydon Hoare 2010-12-02 14:50:00 -08:00
parent b79de6b76c
commit de9fc72cb4
2 changed files with 16 additions and 0 deletions

View File

@ -497,6 +497,7 @@ TEST_XFAILS_LLVM := $(TASK_XFAILS) \
explicit-fail.rs \
fail.rs \
linked-failure.rs \
non-exhaustive-match.rs \
pred.rs \
str-overrun.rs \
vec-overrun.rs \

View File

@ -0,0 +1,15 @@
// -*- rust -*-
// error-pattern:non-exhaustive match failure
tag t {
a;
b;
}
fn main() {
auto x = a;
alt (x) {
case (b) { }
}
}