rust/src/test/compile-fail/non-exhaustive-match-nested.rs
2012-08-06 15:36:30 -07:00

14 lines
208 B
Rust

// -*- rust -*-
// error-pattern: non-exhaustive patterns
enum t { a(u), b }
enum u { c, d }
fn main() {
let x = a(c);
match x {
a(d) => { fail ~"hello"; }
b => { fail ~"goodbye"; }
}
}