]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/inclusive-range-pattern-syntax.rs
Auto merge of #85538 - r00ster91:iterrepeat, r=Mark-Simulacrum
[rust.git] / src / test / ui / lint / inclusive-range-pattern-syntax.rs
1 // check-pass
2 // run-rustfix
3
4 #![warn(ellipsis_inclusive_range_patterns)]
5
6 fn main() {
7     let despondency = 2;
8     match despondency {
9         1...2 => {}
10         //~^ WARN `...` range patterns are deprecated
11         //~| WARN this was previously accepted by the compiler
12         _ => {}
13     }
14
15     match &despondency {
16         &1...2 => {}
17         //~^ WARN `...` range patterns are deprecated
18         //~| WARN this was previously accepted by the compiler
19         _ => {}
20     }
21 }