Add tests based on issue #70372 comments

This commit is contained in:
Amin Arria 2020-03-25 22:34:24 -03:00
parent 5796e6e461
commit ae7fa3042d

View file

@ -0,0 +1,22 @@
// check-pass
#![deny(unreachable_patterns)]
#![feature(or_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)}
_ => ()
}
}