blob: 3cbd0eba57fd1c9c5ca32d0cc87c66047329e16d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#![feature(never_type)]
#![feature(exhaustive_patterns)]
#![deny(unreachable_patterns)]
fn main() {}
fn foo(nevers: &[!]) {
match nevers {
&[] => (),
};
match nevers {
&[] => (),
&[_] => (),
&[_, _, ..] => (),
};
match nevers {
//~^ ERROR non-exhaustive patterns: `&[]` not covered
&[_] => (),
};
}
|