Reduce jargon in "refutable pattern in local binding" diagnostic #58385
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Although the following error is not incorrect, it is unnecessarily obtuse for newcomers:
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
."The text was updated successfully, but these errors were encountered: