erroneous "unnecessary use of to_string
"
#10033
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
Clippy complains about an extra to_string when a
Deref
implementation is provided that results in something different result thanto_string
. I originally described this problem at Why does clippy want two to_string() calls in a row? and @zirconium-n provided the example case here.Lint Name
clippy::unnecessary_to_owned
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen: (no errors)
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: