- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.8k
 
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingT-macrosType: Issues with macros and macro expansionType: Issues with macros and macro expansion
Description
The similar_names lint seems to be very strict with what it considers "similar". For example, I just had clippy give me this warning:
warning: binding's name is too similar to existing binding
  --> src/argparse.rs:53:5
   |
53 |     pub cache_util: f32,
   |     ^^^^^^^^^^^^^^^^^^^
   |
note: lint level defined here
  --> src/main.rs:24:9
   |
24 | #![warn(similar_names)]
   |         ^^^^^^^^^^^^^
note: existing binding defined here
  --> src/argparse.rs:43:5
   |
43 |     pub input: InputType,
   |     ^^^^^^^^^^^^^^^^^^^^
Sure, both of these fields are part of the same struct, but I don't see how input and cache_util are similar or confusing looking variable names.
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingT-macrosType: Issues with macros and macro expansionType: Issues with macros and macro expansion