rust/src/test/run-fail/unwind-alt.rs

13 lines
235 B
Rust
Raw Normal View History

// Issue #945
// error-pattern:non-exhaustive match failure
fn test_box() {
@0;
}
fn test_str() {
2012-08-06 12:34:08 -07:00
let res = match check false { true => { ~"happy" } };
assert res == ~"happy";
}
fn main() {
test_box();
test_str();
}