2016-11-29 15:10:26 +08:00
|
|
|
#![deny(unreachable_patterns)]
|
|
|
|
|
2016-05-12 15:17:02 +02:00
|
|
|
fn main() {
|
|
|
|
let foo = Some(1);
|
|
|
|
match foo {
|
2016-11-29 15:10:26 +08:00
|
|
|
Some(_) => {/* ... */}
|
2016-05-12 15:17:02 +02:00
|
|
|
None => {/* ... */}
|
2016-11-29 15:10:26 +08:00
|
|
|
_ => {/* ... */} //~ ERROR unreachable pattern
|
2016-05-12 15:17:02 +02:00
|
|
|
}
|
|
|
|
}
|