]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/pattern/usefulness/always-inhabited-union-ref.rs
1 // The precise semantics of inhabitedness with respect to unions and references is currently
2 // undecided. This test file currently checks a conservative choice.
4 #![feature(exhaustive_patterns)]
5 #![feature(never_type)]
8 #![allow(unreachable_code)]
14 fn uninhab_ref() -> &'
static ! {
18 fn uninhab_union() -> Foo
{
22 fn match_on_uninhab() {
24 //~^ ERROR non-exhaustive patterns: type `&!` is non-empty
27 match uninhab_union() {
28 //~^ ERROR non-exhaustive patterns: type `Foo` is non-empty