2 #![allow(incomplete_features)]
3 #![feature(or_patterns)]
4 #![deny(unreachable_patterns)]
6 // The ice will get removed once or-patterns are correctly implemented
8 // We wrap patterns in a tuple because top-level or-patterns are special-cased for now.
11 //~^ ERROR simplifyable pattern found
12 // This above is the ICE error message
18 (1,) => {} //~ ERROR unreachable pattern
23 (2,) => {} //~ ERROR unreachable pattern
29 (1 | 2,) => {} //~ ERROR unreachable pattern
33 (1 | 1,) => {} // redundancy not detected for now
39 (1, 3) => {} //~ ERROR unreachable pattern
40 (1, 4) => {} //~ ERROR unreachable pattern
41 (2, 4) => {} //~ ERROR unreachable pattern
42 (2 | 1, 4) => {} //~ ERROR unreachable pattern
46 (None | Some(1 | 2),) => {}
47 (Some(1),) => {} //~ ERROR unreachable pattern
48 (None,) => {} //~ ERROR unreachable pattern
52 ((1 | 2,) | (3 | 4,),) => {},
53 ((1..=4,),) => {}, //~ ERROR unreachable pattern