[FP] extra_unused_lifetimes
can be triggered by a derive macro
#9014
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
Consider this code:
(The code is from the crates.io source code)
The struct itself needs the
'a
lifetime, but notice we use theInsertable
derive macro from the Diesel.Insertable
will triggerextra_unused_lifetimes
and cause the below warning:But you cannot fix it as the warning comes from the outside of your code.
Lint Name
extra_unused_lifetimes
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
No warnings.
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: