-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.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.
Description
trait Trait1<T> {}
trait Trait2<'a> {
type Ty;
}
fn ice(param: Box<for <'a> Trait1<<() as Trait2<'a>>::Ty>>) {}
fn main() {}
stable: error: internal compiler error: ../src/librustc_trans/debuginfo/metadata.rs:306: get_unique_type_id_of_type() - unexpected type: <() as Trait2<'static>>::Ty
nightly: thread 'rustc' panicked at 'assertion failed: ty.is_normalized_for_trans()', ../src/librustc_trans/collector.rs:534
The stable version's ICE error message also appears in nightly if I write a transmute inside ice():
use std::mem;
fn ice(param: Box<for <'a> Trait1<<() as Trait2<'a>>::Ty>>) {
let e: (usize, usize) = unsafe{mem::transmute(param)};
}
(This came up while trying to find ways to convince Rust that two complicated type expressions are the same type. I got this ICE, simplified here.)
Metadata
Metadata
Assignees
Labels
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.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.