False positive of lint similar-names
for identifiers with trailing underscore
#6479
Labels
C-bug
Category: Clippy is not doing the correct thing
good-first-issue
These issues are a good way to get started with Clippy
I-false-positive
Issue: The lint was triggered on code it shouldn't have
I tried this code:
I expected Clippy to not emit any warnings since
types
andtype_
are visually distinct (in my eyes).Instead, Clippy reported
similar_names
suggesting to changetype_
totype__
which does not make much sense to me.Edit: Together with
types
, I use the identifiertype_
quite a lot in my code base, which is a compiler. The unusual name obviously stems from the fact thattype
is a keyword in Rust and thus I cannot use it (but I prefer it totyp
orr#type
). All that to say, this is not an artificial corner case.Meta
clippy 0.0.212 (1c389ff 2020-11-24)
rustc 1.50.0-nightly (1c389ffef 2020-11-24)
Full Standard Error
The text was updated successfully, but these errors were encountered: