mirror of
https://git.proxmox.com/git/rustc
synced 2025-05-05 08:34:36 +00:00
23 lines
375 B
Rust
23 lines
375 B
Rust
#![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
|
|
&[_] => (),
|
|
};
|
|
}
|