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

Remove uneeded PartialOrd bound in cmp::Ord::clamp #130481

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

krtab
Copy link
Contributor

@krtab krtab commented Sep 17, 2024

There is a Self: PartialOrd bound in Ord::clamp, but it is already required by the trait itself. Likely a left-over from the const trait deletion in 76dbe29.

Reported-by: @noeensarguet

@rustbot
Copy link
Collaborator

rustbot commented Sep 17, 2024

r? @cuviper

rustbot has assigned @cuviper.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 17, 2024
@rust-log-analyzer

This comment has been minimized.

There is a Self: PartialOrd bound in Ord::clamp, but it is already
required by the trait itself. Likely a left-over from the const trait
deletion in 76dbe29.

Reported-by: @noeensarguet
@cuviper
Copy link
Member

cuviper commented Sep 17, 2024

I was initially worried that this removal would cause E0276 for anyone who implemented fn clamp themselves, if they copied the same constraint, but it still seems to be fine when that's a supertrait anyway. Thanks for the cleanup!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 17, 2024

📌 Commit 0c9a176 has been approved by cuviper

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 17, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 17, 2024
…iaskrgr

Rollup of 2 pull requests

Successful merges:

 - rust-lang#130481 (Remove uneeded PartialOrd bound in cmp::Ord::clamp)
 - rust-lang#130482 (Remove redundant test typeid equality by subtyping)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0a35418 into rust-lang:master Sep 18, 2024
6 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 18, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 18, 2024
Rollup merge of rust-lang#130481 - krtab:clamp_partial_ord, r=cuviper

Remove uneeded PartialOrd bound in cmp::Ord::clamp

There is a `Self: PartialOrd` bound in `Ord::clamp`, but it is already required by the trait itself. Likely a left-over from the const trait deletion in 76dbe29.

Reported-by: `@noeensarguet`
@krtab
Copy link
Contributor Author

krtab commented Sep 18, 2024

I was initially worried that this removal would cause E0276 for anyone who implemented fn clamp themselves, if they copied the same constraint, but it still seems to be fine when that's a supertrait anyway. Thanks for the cleanup!

@bors r+ rollup

Interesting, I had not thought of this possibility. Thanks for the swift review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants