Incorrect "consider slicing" suggestion with Vec
inside a struct
#120605
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
The suggestion to try
&self.a[..][..]
does not work, and should not be included. If you do try to follow this suggestion, the error then suggests&self.a[..][..][..]
, then&self.a[..][..][..][..]
, and so on.Other cases
No response
Rust Version
(Also repros on latest nightly using the Playground)
Anything else?
No response
The text was updated successfully, but these errors were encountered: