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 &[_] => (), }; }