1 #![feature(or_patterns)]
3 #![allow(incomplete_features)]
4 #![deny(unreachable_patterns)]
6 // We wrap patterns in a tuple because top-level or-patterns are special-cased for now.
8 // Get the fatal error out of the way
11 //~^ ERROR or-patterns are not fully implemented yet
16 (1,) => {} //~ ERROR unreachable pattern
21 (2,) => {} //~ ERROR unreachable pattern
27 (1 | 2,) => {} //~ ERROR unreachable pattern
32 (1, 3) => {} //~ ERROR unreachable pattern
33 (1, 4) => {} //~ ERROR unreachable pattern
34 (2, 4) => {} //~ ERROR unreachable pattern
35 (2 | 1, 4) => {} //~ ERROR unreachable pattern
37 (1, 4 | 5) => {} //~ ERROR unreachable pattern
41 (None | Some(1 | 2),) => {}
42 (Some(1),) => {} //~ ERROR unreachable pattern
43 (None,) => {} //~ ERROR unreachable pattern
47 ((1 | 2,) | (3 | 4,),) => {},
48 ((1..=4,),) => {}, //~ ERROR unreachable pattern
54 | 1,) => {} //~ ERROR unreachable
59 | 0 //~ ERROR unreachable
61 | 0] => {} //~ ERROR unreachable
69 [1 //~ ERROR unreachable
75 Some(0 //~ ERROR unreachable