False positive in needless_pass_by_value on referenced fns #1939
Labels
C-bug
Category: Clippy is not doing the correct thing
E-medium
Call for participation: Medium difficulty level problem and requires some initial experience.
L-correctness
Lint: Belongs in the correctness lint group
The lint does not take into account that the interface may be restricted to a
value type when the function is used as rvalues or in arguments.
Example:
lints with
However, adding a
&
to theString
leads to a compilation error. The solution would be to check for references (we likely need this functionality elsewhere, so we may have it already)The text was updated successfully, but these errors were encountered: