2012-01-19 18:31:08 -08:00
|
|
|
enum t { a, b, }
|
2010-12-02 14:50:00 -08:00
|
|
|
|
2012-02-15 09:40:42 +01:00
|
|
|
fn main() {
|
|
|
|
let x = a;
|
|
|
|
alt x { b { } } //! ERROR non-exhaustive patterns
|
|
|
|
alt true { //! ERROR non-exhaustive bool patterns
|
|
|
|
true {}
|
|
|
|
}
|
|
|
|
alt @some(10) { //! ERROR non-exhaustive patterns
|
|
|
|
@none {}
|
|
|
|
}
|
|
|
|
alt (2, 3, 4) { //! ERROR non-exhaustive literal patterns
|
|
|
|
(_, _, 4) {}
|
|
|
|
}
|
|
|
|
}
|