]> git.lizzy.rs Git - rust.git/blob - src/test/ui/match/match-range-fail-dominate.rs
Rollup merge of #61389 - Zoxc:arena-cleanup, r=eddyb
[rust.git] / src / test / ui / match / match-range-fail-dominate.rs
1 //error-pattern: unreachable
2 //error-pattern: unreachable
3 //error-pattern: unreachable
4 //error-pattern: unreachable
5 //error-pattern: unreachable
6
7 #![deny(unreachable_patterns)]
8
9 fn main() {
10     match 5 {
11       1 ..= 10 => { }
12       5 ..= 6 => { }
13       _ => {}
14     };
15
16     match 5 {
17       3 ..= 6 => { }
18       4 ..= 6 => { }
19       _ => {}
20     };
21
22     match 5 {
23       4 ..= 6 => { }
24       4 ..= 6 => { }
25       _ => {}
26     };
27
28     match 'c' {
29       'A' ..= 'z' => {}
30       'a' ..= 'z' => {}
31       _ => {}
32     };
33
34     match 1.0f64 {
35       0.01f64 ..= 6.5f64 => {}
36       0.02f64 => {}
37       _ => {}
38     };
39 }