-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Description
This code generates an ICE:
pub trait Foo {
fn method1() {}
fn method2();
}
struct Slice<'a, T: 'a>(&'a [T]);
impl <'a, T: 'a> Foo for Slice<'a, T> {
fn method2() {
<Self as Foo>::method1();
}
}
wut.rs:10:9: 10:32 error: internal compiler error: cannot relate bound region: '_#0r <= ReEarlyBound(33, TypeSpace, 0, 'a)
wut.rs:10 <Self as Foo>::method1();
^~~~~~~~~~~~~~~~~~~~~~~
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
Interestingly enough, if Self as Foo
is changed to Slice<'a, T> as Foo
then it compiles just fine!
Metadata
Metadata
Assignees
Labels
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.