Wrong prompt when failed to pattern match boxed enum type #68628
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
For example:
The rust 1.40 compiler will failed to compile this code and tell me:
But unfortunately it's wrong. If I replace
b
by*b
, it will failed again and tell me:Although the second prompt is correct and it works. But I think using
b.as_ref()
is the better idea.The text was updated successfully, but these errors were encountered: