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

Properly substitute inherent associated types. #105224

Merged
merged 1 commit into from
Dec 4, 2022

Conversation

cjgillot
Copy link
Contributor

@cjgillot cjgillot commented Dec 3, 2022

Fixes #104240

@rustbot
Copy link
Collaborator

rustbot commented Dec 3, 2022

r? @compiler-errors

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

@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 Dec 3, 2022
@compiler-errors
Copy link
Member

Looks good to me!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 4, 2022

📌 Commit 8a7ae23 has been approved by compiler-errors

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 Dec 4, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 4, 2022
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#101975 (Suggest to use . instead of :: when accessing a method of an object)
 - rust-lang#105141 (Fix ICE on invalid variable declarations in macro calls)
 - rust-lang#105224 (Properly substitute inherent associated types.)
 - rust-lang#105236 (Add regression test for rust-lang#47814)
 - rust-lang#105247 (Use parent function WfCheckingContext to check RPITIT.)
 - rust-lang#105253 (Update a couple of rustbuild deps)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@fmease
Copy link
Member

fmease commented Dec 4, 2022

Thanks! Does it handle inherent GATs (seeing you only subst. the params from the ADT) or should I open a new issue?

E.g. the following ICEs on nightly:

#![feature(inherent_associated_types)]
struct S;
impl S { type P<T> = T }
fn main() { let _: S::P<()> = (); }

@bors bors merged commit f2e223c into rust-lang:master Dec 4, 2022
@rustbot rustbot added this to the 1.67.0 milestone Dec 4, 2022
@fmease
Copy link
Member

fmease commented Dec 5, 2022

Thanks! Does it handle inherent GATs […]?

I've just checked and it does handle them correctly which is absolutely awesome! inherent_associated_types has finally become quite usable! I love it :)

@cjgillot cjgillot deleted the issue-104240 branch December 5, 2022 15:20
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 5, 2022
…errors

Normalize inherent associated types after substitution

Fixes rust-lang#105314.

r? `@cjgillot` (rust-lang#105224)
`@rustbot` label F-inherent_associated_types
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 5, 2022
…errors

Normalize inherent associated types after substitution

Fixes rust-lang#105314.

r? ``@cjgillot`` (rust-lang#105224)
``@rustbot`` label F-inherent_associated_types
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 5, 2022
…errors

Normalize inherent associated types after substitution

Fixes rust-lang#105314.

r? ```@cjgillot``` (rust-lang#105224)
```@rustbot``` label F-inherent_associated_types
JohnTitor pushed a commit to JohnTitor/rust that referenced this pull request Dec 6, 2022
…errors

Normalize inherent associated types after substitution

Fixes rust-lang#105314.

r? ````@cjgillot```` (rust-lang#105224)
````@rustbot```` label F-inherent_associated_types
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.

ICE with inherent associated type: Type parameter out of range when substituting
5 participants