-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-trait-systemArea: Trait systemArea: Trait systemI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Description
This code:
pub trait Foo<T> {
pub fn func1<U>(&self, t: U);
pub fn func2<U>(&mut self, t: U) {
self.func1(t); // Compiles if this is omitted
}
}
Fails with the message: 'index out of bounds: the len is 1 but the index is 1', /home/james/projects/rust/compiler/src/librustc/middle/subst.rs:58
Seems to be getting mixed up with the trait parameters, if I add another type parameter to Foo
, I get an index of 2, instead of 1.
Metadata
Metadata
Assignees
Labels
A-trait-systemArea: Trait systemArea: Trait systemI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️