fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0005]: refutable pattern in local binding 2 --> $DIR/uninhabited-irrefutable.rs:29:9 3 | 4LL | let Foo::D(_y, _z) = x; 5 | ^^^^^^^^^^^^^^ pattern `Foo::A(_)` not covered 6 | 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 9note: `Foo` defined here 10 --> $DIR/uninhabited-irrefutable.rs:18:6 11 | 12LL | enum Foo { 13 | ^^^ 14LL | 15LL | A(foo::SecretlyEmpty), 16 | - not covered 17 = note: pattern `Foo::A(_)` is currently uninhabited, but this variant contains private fields which may become inhabited in the future 18 = note: the matched value is of type `Foo` 19help: you might want to use `let else` to handle the variant that isn't matched 20 | 21LL | let Foo::D(_y, _z) = x else { todo!() }; 22 | ++++++++++++++++ 23 24error: aborting due to previous error 25 26For more information about this error, try `rustc --explain E0005`.