Confusing error message when trying to use String as a Pattern #62843
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Consider this code (playground):
On both current stable and nightly, this results in this error message:
This is really confusing, since the proper way to get this to compile is to use a reference instead of an owned string:
The text was updated successfully, but these errors were encountered: