Repository navigation
Trait upcasting ICE with projection in (duplicate) supertrait bound #135463
Copy link
Copy link
Closed
Labels
A-coercionsArea: implicit and explicit `expr as Type` coercionsArea: implicit and explicit `expr as Type` coercionsA-dyn-traitArea: trait objects, vtable layoutArea: trait objects, vtable layoutC-bugCategory: This is a bug.Category: This is a bug.F-trait_upcasting`#![feature(trait_upcasting)]``#![feature(trait_upcasting)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Description
Activity
- addedneeds-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingA-coercionsArea: implicit and explicit `expr as Type` coercionsArea: implicit and explicit `expr as Type` coercionsA-dyn-traitArea: trait objects, vtable layoutArea: trait objects, vtable layoutF-trait_upcasting`#![feature(trait_upcasting)]``#![feature(trait_upcasting)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
on Jan 13, 2025 Ty for breaking this out into a separate issue.
@compiler-errors just to avoid confusion: this is different from #135318 (comment) 😉.
Nah, it has the same root cause.
Actually 🤔 wait, this has to do with MIR validation.
I’ll happily open an issue for #135318 (comment), too, once it actually ICEs on nightly [or if I find a variant of it that already ICEs before #135318].
- added 2 commits that reference this issue
on Jan 15, 2025 - added a commit that references this issue
on Jan 15, 2025 - removedneeds-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
on Jan 16, 2025
Metadata
Metadata
Assignees
Labels
A-coercionsArea: implicit and explicit `expr as Type` coercionsArea: implicit and explicit `expr as Type` coercionsA-dyn-traitArea: trait objects, vtable layoutArea: trait objects, vtable layoutC-bugCategory: This is a bug.Category: This is a bug.F-trait_upcasting`#![feature(trait_upcasting)]``#![feature(trait_upcasting)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
This code ICEs only in release mode:
(playground)
It doesn't ICE on debug builds. It also doesn't ICE, if
Pdoesn't match the()type, e.g. if the call is changed toupcast::<u8>….Tested on nightly, and also on #135318:
(As of this writing) this ICE is not fixed in #135318 either.
@rustbot label requires-nightly, T-compiler, I-ICE, F-trait_upcasting, A-trait-objects, A-coercions