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