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 type_repetition_in_bounds #8224

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

Jarcho
Copy link
Contributor

@Jarcho Jarcho commented Jan 4, 2022

fixes #7360
fixes #8162
fixes #8056

changelog: Check for full equality in type_repetition_in_bounds rather than just equal hashes

@rust-highfive
Copy link

r? @llogiq

(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 Jan 4, 2022
@Jarcho Jarcho force-pushed the type_repetition_in_bounds_8162 branch from 3c40f85 to 1f38736 Compare January 4, 2022 19:28
@Jarcho Jarcho force-pushed the type_repetition_in_bounds_8162 branch from 1f38736 to 2dd216a Compare January 4, 2022 19:28
@llogiq
Copy link
Contributor

llogiq commented Jan 4, 2022

Great! More false positives quashed. Thank you! @bors r+

@bors
Copy link
Contributor

bors commented Jan 4, 2022

📌 Commit 2dd216a has been approved by llogiq

@bors
Copy link
Contributor

bors commented Jan 5, 2022

⌛ Testing commit 2dd216a with merge 20f2a89...

@bors
Copy link
Contributor

bors commented Jan 5, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 20f2a89 to master...

@bors bors merged commit 20f2a89 into rust-lang:master Jan 5, 2022
@jendrikw
Copy link
Contributor

jendrikw commented Jan 8, 2022

I think there is still a false positive in this case (or is the playground not using the latest version?):

playground

#![warn(clippy::type_repetition_in_bounds)]
fn f<I, J>(_: I, _: J)
where
    I: IntoIterator,
    <I as IntoIterator>::IntoIter: Clone,
    J: IntoIterator,
    <J as IntoIterator>::IntoIter: Clone,
{}

results in:

warning: this type has already been used as a bound predicate
 --> src/lib.rs:7:5
  |
7 |     <J as IntoIterator>::IntoIter: Clone,
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
note: the lint level is defined here
 --> src/lib.rs:1:9
  |
1 | #![warn(clippy::type_repetition_in_bounds)]
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  = help: consider combining the bounds: `<J as IntoIterator>::IntoIter: Clone + Clone`

@Jarcho
Copy link
Contributor Author

Jarcho commented Jan 8, 2022

Changes in clippy are only synced every two(?) weeks with the main repo. So it can take a little while for changes to make it to the playground.

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
5 participants