Awkward pattern matching error "cannot be named the same as a tuple variant" #98974
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.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=4afb15166fa46eb6f2eaf2ba053d9501
The current output is:
Ideally the output should look like:
One of my colleagues who is new to Rust is familiar with the idea behind pattern matching, but was not aware of all the syntax required to make it work. They made a best guess using the demo above and was puzzled by the error message
In a similar block of code
the current error looks like this:
The text was updated successfully, but these errors were encountered: