rust/src/test/ui/match/match-slice-patterns.rs
2018-12-25 21:08:33 -07:00

14 lines
277 B
Rust

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