1 error[E0005]: refutable pattern in local binding: `A(_)` not covered
2 --> $DIR/uninhabited-irrefutable.rs:27:9
4 LL | let Foo::D(_y) = x;
5 | ^^^^^^^^^^ pattern `A(_)` not covered
7 = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
8 = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
9 note: `Foo` defined here
10 --> $DIR/uninhabited-irrefutable.rs:19:5
14 LL | A(foo::SecretlyEmpty),
16 = note: the matched value is of type `Foo`
17 help: you might want to use `if let` to ignore the variant that isn't matched
19 LL | if let Foo::D(_y) = x { /* */ }
20 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 error: aborting due to previous error
24 For more information about this error, try `rustc --explain E0005`.