Closed
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.