-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
ICE: expected Binder to have 0 projections, but it has 1
#139418
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
requires-debug-assertions
This issue requires a build of rustc or tooling with debug-assertions in some way
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Apr 7, 2025
…l-with-proj, r=oli-obk Fix trait upcasting to dyn type with no principal when there are projections rust-lang#126660 (which I had originally authored, lol) had a subtle bug that is the moral equivalent of rust-lang#114036, which is that when upcasting from `dyn Principal<Projection = Ty> + AutoTrait` to `dyn AutoTrait`, we were dropping the trait ref for `Principal` but not its projections (if there were any). With debug assertions enabled, this triggers the assertion I luckily added in a2a0cfe, but even without debug assertions this is a logical bug since we had a dyn type with just a projection bound but no principal, so it caused a type mismatch. This does not need an FCP because this should've been covered by the FCP in rust-lang#126660, but we just weren't testing a case when casting from a `dyn` type with projections 😸 Fixes rust-lang#139418 r? `@oli-obk` (or anyone)
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Apr 7, 2025
…l-with-proj, r=oli-obk Fix trait upcasting to dyn type with no principal when there are projections rust-lang#126660 (which I had originally authored, lol) had a subtle bug that is the moral equivalent of rust-lang#114036, which is that when upcasting from `dyn Principal<Projection = Ty> + AutoTrait` to `dyn AutoTrait`, we were dropping the trait ref for `Principal` but not its projections (if there were any). With debug assertions enabled, this triggers the assertion I luckily added in a2a0cfe, but even without debug assertions this is a logical bug since we had a dyn type with just a projection bound but no principal, so it caused a type mismatch. This does not need an FCP because this should've been covered by the FCP in rust-lang#126660, but we just weren't testing a case when casting from a `dyn` type with projections 😸 Fixes rust-lang#139418 r? ``@oli-obk`` (or anyone)
Zalathar
added a commit
to Zalathar/rust
that referenced
this issue
Apr 8, 2025
…l-with-proj, r=oli-obk Fix trait upcasting to dyn type with no principal when there are projections rust-lang#126660 (which I had originally authored, lol) had a subtle bug that is the moral equivalent of rust-lang#114036, which is that when upcasting from `dyn Principal<Projection = Ty> + AutoTrait` to `dyn AutoTrait`, we were dropping the trait ref for `Principal` but not its projections (if there were any). With debug assertions enabled, this triggers the assertion I luckily added in a2a0cfe, but even without debug assertions this is a logical bug since we had a dyn type with just a projection bound but no principal, so it caused a type mismatch. This does not need an FCP because this should've been covered by the FCP in rust-lang#126660, but we just weren't testing a case when casting from a `dyn` type with projections 😸 Fixes rust-lang#139418 r? ```@oli-obk``` (or anyone)
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Apr 8, 2025
Rollup merge of rust-lang#139421 - compiler-errors:upcast-no-principal-with-proj, r=oli-obk Fix trait upcasting to dyn type with no principal when there are projections rust-lang#126660 (which I had originally authored, lol) had a subtle bug that is the moral equivalent of rust-lang#114036, which is that when upcasting from `dyn Principal<Projection = Ty> + AutoTrait` to `dyn AutoTrait`, we were dropping the trait ref for `Principal` but not its projections (if there were any). With debug assertions enabled, this triggers the assertion I luckily added in a2a0cfe, but even without debug assertions this is a logical bug since we had a dyn type with just a projection bound but no principal, so it caused a type mismatch. This does not need an FCP because this should've been covered by the FCP in rust-lang#126660, but we just weren't testing a case when casting from a `dyn` type with projections 😸 Fixes rust-lang#139418 r? ````@oli-obk```` (or anyone)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
requires-debug-assertions
This issue requires a build of rustc or tooling with debug-assertions in some way
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
snippet:
Version information
Command:
/home/gh-matthiaskrgr/.rustup/toolchains/local-debug-assertions/bin/rustc --edition=2024
Program output
The text was updated successfully, but these errors were encountered: