dead_code lint is triggered when a field is only used in Debug impls #8353
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
I upgraded our project from 1.56.1 to 1.58.1 and got a lot of new warnings about dead code because fields are never read. It seems that the fields in question are used only in
Debug
impls. This is still a usage so the lint should not trigger.Lint Name
dead_code
Reproducer
I tried this code:
I saw this happen:
I expected this to happen:
No warnings.
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: