Exception to struct_field_names
#12922
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 propose that the
clippy::struct_field_names
lint, which checks for struct fields whose names share words with the struct's name, check the type name of the struct field—and forego emitting the lint if the field name matches its type (especially from a different scope).Lint Name
struct_field_names
Reproducer
Some motivating examples:
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: