Closed
Description
Although the following error is not incorrect, it is unnecessarily obtuse for newcomers:
error[E0005]: refutable pattern in local binding: `T(_, _)` not covered
--> $DIR/empty-never-array.rs:10:9
|
LL | let Helper::U(u) = Helper::T(t, []);
| ^^^^^^^^^^^^ pattern `T(_, _)` not covered
error: aborting due to previous error
We should probably reword the error to have a better explanation of what is happening in terms that someone just starting in the language can understand it along the lines "Hey! You are trying to destructure (even more jargon) an enum variant, but you aren't handling other possible enum variants. You might have meant to use if let
."