Wrong fix is suggested when renamed
is unused in MyStruct { y: renamed }
#82488
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
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.
Given the following code (playground link):
The current warning output is (ignoring non-relevant parts):
Ideally the output should look like:
because using
y: renamed: _
does not work (of course).Using
cargo fix
is broken by this too, I got the following message (removing the big message about making a bug report to remove clutter):@rustbot label A-diagnostics C-bug D-incorrect D-invalid-suggestion
The text was updated successfully, but these errors were encountered: