]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/inclusive-range-pattern-syntax.fixed
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / ui / lint / inclusive-range-pattern-syntax.fixed
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 is accepted in the current edition
12         _ => {}
13     }
14
15     match &despondency {
16         &(1..=2) => {}
17         //~^ WARN `...` range patterns are deprecated
18         //~| WARN this is accepted in the current edition
19         _ => {}
20     }
21 }