-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[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
Comments
JohnTitor
added
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
labels
Jun 18, 2022
dswij
added a commit
to dswij/rust-clippy
that referenced
this issue
Jun 24, 2022
This commit adds test for a `extra_unused_lifetimes` false positive from derive (rust-lang#9014). The fix for the FP is introduced in rust-lang#9037.
dswij
added a commit
to dswij/rust-clippy
that referenced
this issue
Jun 24, 2022
This commit adds test for a `extra_unused_lifetimes` false positive from derive (rust-lang#9014). The fix for the FP is introduced in rust-lang#9037.
bors
added a commit
that referenced
this issue
Jun 29, 2022
`extra_unused_lifetimes` add FP test case emitting from derived attributes. Add test to cover for #9014 which is fixed in #9037. changelog: [`extra_unused_lifetimes`] Add FP test case emitting from derived attributes. --- Seeing the FP from the test: ```sh $ git revert -m 1 1d1ae10 $ TESTNAME=extra_unused_lifetime cargo uitest ```
jjlin
added a commit
to jjlin/vaultwarden
that referenced
this issue
Jul 1, 2022
The latest version (1.62.0) that was just released includes Clippy changes (rust-lang/rust-clippy#9014) that break the build.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: