summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/usefulness/match-slice-patterns.rs
blob: 92d74b8c229d6000c17bc132b00ee47f4dd82a40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
fn check(list: &[Option<()>]) {
    match list {
    //~^ ERROR `&[_, Some(_), .., None, _]` not covered
        &[] => {},
        &[_] => {},
        &[_, _] => {},
        &[_, None, ..] => {},
        &[.., Some(_), _] => {},
    }
}

fn main() {}