rust/tests/ui/pattern/usefulness/match-slice-patterns.rs
2023-01-11 09:32:08 +00:00

13 lines
252 B
Rust

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