Add some more tests

This commit is contained in:
Nadrieril 2019-11-21 19:06:49 +00:00
parent 6e85f467c5
commit 0030a777f2

View File

@ -42,4 +42,15 @@ fn main() {
(2 | 1, 4) => {} //~ ERROR unreachable pattern
_ => {}
}
match (Some(0u8),) {
(None | Some(1 | 2),) => {}
(Some(1),) => {} //~ ERROR unreachable pattern
(None,) => {} //~ ERROR unreachable pattern
(Some(_),) => {}
}
match ((0u8,),) {
((1 | 2,) | (3 | 4,),) => {},
((1..=4,),) => {}, //~ ERROR unreachable pattern
((_,),) => {},
}
}