rust/tests/ui/match/match-wildcards.rs
2024-02-16 20:02:50 +00:00

22 lines
376 B
Rust

//@ run-fail
//@ error-pattern:squirrelcupcake
//@ ignore-emscripten no processes
fn cmp() -> isize {
match (Some('a'), None::<char>) {
(Some(_), _) => {
panic!("squirrelcupcake");
}
(_, Some(_)) => {
panic!();
}
_ => {
panic!("wat");
}
}
}
fn main() {
println!("{}", cmp());
}