Skip to content
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

Fix extra_unused_lifetimes false positive #9037

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

smoelius
Copy link
Contributor

This PR fixes #9014.

I confirmed the FP on the crates.io source as @JohnTitor mentioned, and confirmed that the FP is no longer present following this change.

I did not include a test in this PR because I think constructing one would be complicated, and the fix is pretty simple. But please let me know if this is unacceptable.

changelog: fix extra_unused_lifetimes FP

@rust-highfive
Copy link

r? @dswij

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 23, 2022
Copy link
Member

@dswij dswij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

Ideally, we'd have tests for this. But the change is small enough and doesn't break the current tests. I guess we can merge this in and add the tests in a separate PR.

@dswij
Copy link
Member

dswij commented Jun 24, 2022

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 24, 2022

📌 Commit 87eded6 has been approved by dswij

@bors
Copy link
Collaborator

bors commented Jun 24, 2022

⌛ Testing commit 87eded6 with merge 1d1ae10...

@bors
Copy link
Collaborator

bors commented Jun 24, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: dswij
Pushing 1d1ae10 to master...

@bors bors merged commit 1d1ae10 into rust-lang:master Jun 24, 2022
@smoelius smoelius deleted the fix-extra-unused-lifetimes-fp branch June 24, 2022 09:00
dswij added a commit to dswij/rust-clippy that referenced this pull request 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 pull request 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
Copy link
Member

dswij commented Jun 24, 2022

I've added the test to cover for this in #9043

@smoelius
Copy link
Contributor Author

Nice!

bors added a commit that referenced this pull request 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
```
@BlackDex
Copy link

Sorry to post here, but is there any chance of this fix to also end up in/gets backported to 1.63?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FP] extra_unused_lifetimes can be triggered by a derive macro
5 participants