Skip to content

Ignore Self in bounds check for associated types with Self:Sized #137097

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

Merged
merged 1 commit into from
Feb 16, 2025

Conversation

compiler-errors
Copy link
Member

Fixes #137053

This is morally a fix of #112319, since the Self: Sized check was just missing here.

r? oli-obk

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 15, 2025
@oli-obk
Copy link
Contributor

oli-obk commented Feb 15, 2025

cc @rust-lang/types @rust-lang/lang

While this allows more code to compile and thus technically requires an FCP, it was just a bug that we required associated types to be mentioned in dyn trait iff the assoc ty has bounds. We filtered out assoc types before, just not the predicates that exist for them.

I consider this covered by previous approvals and just an impl bug

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 15, 2025

📌 Commit 309e371 has been approved by oli-obk

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 Feb 15, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 16, 2025
Rollup of 5 pull requests

Successful merges:

 - rust-lang#135797 (Import initial generated 1.85 relnotes)
 - rust-lang#135909 (Export kernel descriptor for amdgpu kernels)
 - rust-lang#136545 (nvptx64: update default alignment to match LLVM 21)
 - rust-lang#137092 (abi_unsupported_vector_types: say which type is the problem)
 - rust-lang#137097 (Ignore Self in bounds check for associated types with Self:Sized)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7884e17 into rust-lang:master Feb 16, 2025
6 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 16, 2025
Rollup merge of rust-lang#137097 - compiler-errors:sized-bound-self, r=oli-obk

Ignore Self in bounds check for associated types with Self:Sized

Fixes rust-lang#137053

This is morally a fix of rust-lang#112319, since the `Self: Sized` check was just missing here.

r? oli-obk
@rustbot rustbot added this to the 1.87.0 milestone Feb 16, 2025
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Self as generic trait parameter is not properly ignored by Self: Sized bound
4 participants