False positive: cow
and into_owned
#13624
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
When using a
Cow
type clippy warns about the usage ofinto_owned
but it's suggested alternative doesn't work.Lint Name
clippy::unnecessary_to_owned
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
Either no warning, or a suggestion that works
Version
rustc 1.80.1 (3f5fd8dd4 2024-08-06)
binary: rustc
commit-hash: 3f5fd8dd41153bc5fdca9427e9e05be2c767ba23
commit-date: 2024-08-06
host: x86_64-unknown-linux-gnu
release: 1.80.1
LLVM version: 18.1.7
Additional Labels
No response
The text was updated successfully, but these errors were encountered: