Closed
Description
#![feature(generic_associated_types)]
struct S;
trait Trait {
type Associated<'a>;
}
impl Trait for S {
type Associated<'a> = &'a ();
}
fn main() {}
error: internal compiler error: librustc/ty/subst.rs:439: Region parameter out of range when substituting in region 'a (root type=Some(TestIterItem<'a>)) (index=0)
thread 'rustc' panicked at 'Box<Any>', librustc_errors/lib.rs:488:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: aborting due to 2 previous errors
Probably related: #47309
I can reproduce this with rustc 1.26.0-nightly (f5631d9ac 2018-03-24)
.
Metadata
Metadata
Assignees
Labels
Area: Generic associated types (GATs)Area: Associated items (types, constants & functions)Area: Trait systemArea: Type systemCategory: This is a bug.`#![feature(generic_associated_types)]` a.k.a. GATsIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.Working group: Traits, https://internals.rust-lang.org/t/announcing-traits-working-group/6804ICE tracked in rust-lang/glacier.This issue requires a nightly compiler in some way.