Erroneous suggestion to add a slice in pattern-matching #96103
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
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=44c555e3d1e880be0fcff214d82cfe75
The current output is:
The suggestion to try writing
foo[..]
is erroneous and would cause a different type error ("cannot index into a value of type&Foo
"). I believe the suggestion should be removed here.The text was updated successfully, but these errors were encountered: