]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lint/inclusive-range-pattern-syntax.rs
Update upstream source from tag 'upstream/1.55.0+dfsg1'
[rustc.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 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 }