2024-03-02 19:22:37 -06:00
|
|
|
//@ run-pass
|
2020-03-25 20:34:24 -05:00
|
|
|
|
|
|
|
#![deny(unreachable_patterns)]
|
|
|
|
|
|
|
|
fn main() {
|
2024-03-02 19:22:37 -06:00
|
|
|
match (3, 42) {
|
|
|
|
(a, _) | (_, a) if a > 10 => {}
|
|
|
|
_ => unreachable!(),
|
2020-03-25 20:34:24 -05:00
|
|
|
}
|
|
|
|
|
2024-03-02 19:22:37 -06:00
|
|
|
match Some((3, 42)) {
|
|
|
|
Some((a, _)) | Some((_, a)) if a > 10 => {}
|
|
|
|
_ => unreachable!(),
|
2020-03-25 20:34:24 -05:00
|
|
|
}
|
|
|
|
|
2024-03-02 19:22:37 -06:00
|
|
|
match Some((3, 42)) {
|
|
|
|
Some((a, _) | (_, a)) if a > 10 => {}
|
|
|
|
_ => unreachable!(),
|
2020-03-25 20:34:24 -05:00
|
|
|
}
|
|
|
|
}
|