redundant-clone: False positive with moved data #5595
Labels
C-bug
Category: Clippy is not doing the correct thing
E-hard
Call for participation: This a hard problem and requires more experience or effort to work on
I-false-positive
Issue: The lint was triggered on code it shouldn't have
I have made the following small example to illustrate a warning of
redudant-clone
I've been getting:Which gives me:
However, removing the clone would result in a error as the data will be moved to the closure while still borrowed as an argument to
foo
. Am I right to think this is a false positive, or am I messing something to fix this?The text was updated successfully, but these errors were encountered: