summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.rs
blob: a619fcafc86144ad43af4af42ab3196080d283c8 (plain)
1
2
3
4
5
6
7
8
9
fn main() {
    match &[1, 2, 3][..] {
        [1, rest..] => println!("{rest:?}"),
        //~^ ERROR cannot find value `rest` in this scope
        //~| ERROR cannot find value `rest` in this scope
        //~| ERROR `X..` patterns in slices are experimental
        _ => {}
    }
}