summary refs log tree commit diff
path: root/src/test/ui/lint/inclusive-range-pattern-syntax.fixed
blob: 9fce66a0a83cc3821b794d3cbcbd5f79b9c13520 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// build-pass (FIXME(62277): could be check-pass?)
// run-rustfix

#![warn(ellipsis_inclusive_range_patterns)]

fn main() {
    let despondency = 2;
    match despondency {
        1..=2 => {}
        //~^ WARN `...` range patterns are deprecated
        _ => {}
    }

    match &despondency {
        &(1..=2) => {}
        //~^ WARN `...` range patterns are deprecated
        _ => {}
    }
}