mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
21 lines
377 B
Rust
21 lines
377 B
Rust
//@ run-pass
|
|
|
|
#![deny(unreachable_patterns)]
|
|
|
|
fn main() {
|
|
match (3, 42) {
|
|
(a, _) | (_, a) if a > 10 => {}
|
|
_ => unreachable!(),
|
|
}
|
|
|
|
match Some((3, 42)) {
|
|
Some((a, _)) | Some((_, a)) if a > 10 => {}
|
|
_ => unreachable!(),
|
|
}
|
|
|
|
match Some((3, 42)) {
|
|
Some((a, _) | (_, a)) if a > 10 => {}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|