Closed
Description
(spawned off of #63154)
This variant of the code from #63154 still causes an ICE on nightly rustc (play):
trait Trait {
type Assoc;
}
impl Trait for () {
type Assoc = ();
}
trait Dummy<T> {}
impl<T> Dummy<T> for () {}
fn make<T: Trait>() -> impl Dummy<T::Assoc> {}
fn extract<T>(_: impl Dummy<T>) -> Option<T> {
None
}
pub fn ice() {
extract(make::<()>());
}
yields:
error: internal compiler error: broken MIR in DefId(0:26 ~ issue_63154_b[8787]::ice[0]) (NoSolution): could not prove Binder(TraitPredicate(<impl Dummy<<() as Trait>::Assoc> as Dummy<()>>))
thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:391:17
Metadata
Metadata
Assignees
Labels
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Trait systemCategory: This is a bug.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️High priorityRelevant to the compiler team, which will review and decide on the PR/issue.ICE tracked in rust-lang/glacier.