Incorrect needless_borrow
#8408
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 suggests removing a borrow that would lead to ownership being moved.
Lint Name
needless_borrow
Reproducer
I tried this code:
I saw this happen:
If we follow the lint:
Our code does not compile:
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: