rust/src/test/compile-fail/non-exhaustive-match-nested.rs

14 lines
197 B
Rust
Raw Normal View History

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