rust/src/test/ui/match/match-wildcards.rs

21 lines
339 B
Rust
Raw Normal View History

2020-04-16 01:50:32 -05:00
// run-fail
// error-pattern:squirrelcupcake
2020-04-16 01:50:32 -05:00
fn cmp() -> isize {
match (Some('a'), None::<char>) {
2016-05-26 21:39:36 -05:00
(Some(_), _) => {
panic!("squirrelcupcake");
}
(_, Some(_)) => {
panic!();
}
_ => {
panic!("wat");
}
}
}
2016-05-26 21:39:36 -05:00
fn main() {
println!("{}", cmp());
}