summary refs log tree commit diff
path: root/src/test/ui/pattern/usefulness/match-slice-patterns.rs
blob: afbeb61e4415af0cd799b08d37fbc2f8c7f24f7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![feature(slice_patterns)]

fn check(list: &[Option<()>]) {
    match list {
    //~^ ERROR `&[_, Some(_), None, _]` not covered
        &[] => {},
        &[_] => {},
        &[_, _] => {},
        &[_, None, ..] => {},
        &[.., Some(_), _] => {},
    }
}

fn main() {}