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

[extra_unused_type_parameters]: Fix edge case FP for parameters in where bounds #11484

Merged
merged 1 commit into from Sep 15, 2023

Conversation

mkrasnitski
Copy link
Contributor

@mkrasnitski mkrasnitski commented Sep 12, 2023

Generic parameters can end up being used on the left side of where-bounds if they are not directly bound but instead appear nested in some concrete generic type. Therefore, we should walk the left side of where bounds, but only if the bounded type is not a generic param, in which case we still need to ignore the bound.

Fixes #11302

changelog: [extra_unused_type_parameters]: Fix edge case false positive for parameters in where bounds

@rustbot
Copy link
Collaborator

rustbot commented Sep 12, 2023

r? @Jarcho

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 12, 2023
@Jarcho
Copy link
Contributor

Jarcho commented Sep 15, 2023

Thank you. @bors r+

@bors
Copy link
Collaborator

bors commented Sep 15, 2023

📌 Commit f598bb7 has been approved by Jarcho

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Sep 15, 2023

⌛ Testing commit f598bb7 with merge e609279...

@bors
Copy link
Collaborator

bors commented Sep 15, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Jarcho
Pushing e609279 to master...

@bors bors merged commit e609279 into rust-lang:master Sep 15, 2023
5 checks passed
@mkrasnitski mkrasnitski deleted the fix-11302 branch September 16, 2023 16:41
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.

extra_unused_type_parameters + where clause requiring the parameter
4 participants