rust/tests/ui/error-codes/E0001.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
205 B
Rust
Raw Normal View History

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