rust/src/test/run-fail/unwind-alt.rs
Brian Anderson 564bdacece Add an assert to run-fail/unwind-alt
Jesse reported not being able to reproduce this without the assert. May have
to do with optimtizations.
2011-09-20 11:26:01 -07:00

13 lines
222 B
Rust

// Issue #945
// error-pattern:non-exhaustive match failure
fn test_box() {
@0;
}
fn test_str() {
let res = alt false { true { "happy" } };
assert res == "happy";
}
fn main() {
test_box();
test_str();
}