mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
22 lines
387 B
Rust
22 lines
387 B
Rust
//@ check-pass
|
|
|
|
#![deny(unreachable_patterns)]
|
|
|
|
fn main() {
|
|
match (3,42) {
|
|
(a,_) | (_,a) if a > 10 => {println!("{}", a)}
|
|
_ => ()
|
|
}
|
|
|
|
match Some((3,42)) {
|
|
Some((a, _)) | Some((_, a)) if a > 10 => {println!("{}", a)}
|
|
_ => ()
|
|
|
|
}
|
|
|
|
match Some((3,42)) {
|
|
Some((a, _) | (_, a)) if a > 10 => {println!("{}", a)}
|
|
_ => ()
|
|
}
|
|
}
|