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

Extend trait_duplication_in_bounds to cover trait objects #10727

Merged
merged 9 commits into from
May 9, 2023

Conversation

john-h-k
Copy link
Contributor

This PR extends trait_duplication_in_bounds to cover trait objects.

Currently,

fn foo(_a: &(dyn Any + Send + Send)) {}

generates no warnings. With this PR, it will complain about a duplicate trait and can remove it

Moved from rust-lang/rust#110991

changelog: [trait_duplication_in_bounds]: warn on duplicate trait object constraints

@rustbot
Copy link
Collaborator

rustbot commented Apr 30, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Manishearth (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Apr 30, 2023
clippy_lints/src/trait_bounds.rs Outdated Show resolved Hide resolved
clippy_lints/src/trait_bounds.rs Outdated Show resolved Hide resolved
@john-h-k
Copy link
Contributor Author

john-h-k commented May 2, 2023

@rustbot review

clippy_lints/src/trait_bounds.rs Outdated Show resolved Hide resolved
clippy_lints/src/trait_bounds.rs Show resolved Hide resolved
@Manishearth
Copy link
Member

Ah, for some reason I thought this lint was incorporating supertrait bounds but now that I look closer I see that is not the case.

@bors r+

@bors
Copy link
Collaborator

bors commented May 9, 2023

📌 Commit b169bdb has been approved by Manishearth

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented May 9, 2023

⌛ Testing commit b169bdb with merge 77e4d7a...

@bors
Copy link
Collaborator

bors commented May 9, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Manishearth
Pushing 77e4d7a to master...

@bors bors merged commit 77e4d7a into rust-lang:master May 9, 2023
4 checks passed
@john-h-k john-h-k deleted the lint/dup-auto-traits branch May 9, 2023 14:57
@john-h-k john-h-k restored the lint/dup-auto-traits branch May 9, 2023 14:57
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.

None yet

5 participants