unused_variables gives bad suggestion for nested struct pattern #88403
Labels
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-bug
Category: This is a bug.
I tried this code:
This generates an unused_variables lint for the pattern. However, the suggestion it gives causes the code to fail to compile:
I think it should give the same suggestion it gives for a non-nested binding, like this:
Found during crater run for https://github.com/Kylebrown9/Slang
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: