blob: 2da2163726da2d8043855ca5db7f9090f0e09411 [file] [log] [blame] [edit]
//@ run-pass
pub fn main() {
let x = 1;
let y = 2;
assert_eq!(3, match (x, y) {
(1, 1) => 1,
(2, 2) => 2,
(1..=2, 2) => 3,
_ => 4,
});
// nested tuple
assert_eq!(3, match ((x, y),) {
((1, 1),) => 1,
((2, 2),) => 2,
((1..=2, 2),) => 3,
_ => 4,
});
}