diagnostics: suggest dereferencing when trying to use a reference as index #96678
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:
The current output is:
Ideally the output should look like:
It would be great if rustc could suggest dereferencing:
[i]
->[*i]
which fixes the buildThe text was updated successfully, but these errors were encountered: