2012-01-30 23:00:57 -06:00
|
|
|
// -*- rust -*-
|
2012-02-15 02:40:42 -06:00
|
|
|
// error-pattern: non-exhaustive patterns
|
2012-01-30 23:00:57 -06:00
|
|
|
enum t { a(u), b }
|
|
|
|
enum u { c, d }
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x = a(c);
|
|
|
|
alt x {
|
|
|
|
a(d) { fail "hello"; }
|
|
|
|
b { fail "goodbye"; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|