2019-12-11 08:51:28 -06:00
|
|
|
#![feature(never_type)]
|
2018-01-21 02:44:41 -06:00
|
|
|
#![feature(exhaustive_patterns)]
|
2016-11-30 21:37:03 -06:00
|
|
|
|
|
|
|
mod foo {
|
|
|
|
pub struct SecretlyEmpty {
|
|
|
|
_priv: !,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct NotSoSecretlyEmpty {
|
|
|
|
pub _pub: !,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct NotSoSecretlyEmpty {
|
|
|
|
_priv: !,
|
|
|
|
}
|
|
|
|
|
|
|
|
enum Foo {
|
|
|
|
A(foo::SecretlyEmpty),
|
|
|
|
B(foo::NotSoSecretlyEmpty),
|
|
|
|
C(NotSoSecretlyEmpty),
|
2022-03-07 23:54:38 -06:00
|
|
|
D(u32, u32),
|
2016-11-30 21:37:03 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2022-03-07 23:54:38 -06:00
|
|
|
let x: Foo = Foo::D(123, 456);
|
2022-09-02 22:01:35 -05:00
|
|
|
let Foo::D(_y, _z) = x; //~ ERROR refutable pattern in local binding: `Foo::A(_)` not covered
|
2016-11-30 21:37:03 -06:00
|
|
|
}
|