Closed
Description
This is the next thing blocking removal of iter-trait:
trait MyIter<A> {
fn myeach(&self, blk: fn(v: &A) -> bool);
}
trait ExtendedIter<A> {
fn myeachi(&self, blk: fn(uint, v: &A) -> bool);
}
impl <A, IA: MyIter<A>> IA: ExtendedIter<A> {
fn myeachi(&self, blk: fn(uint, v: &A) -> bool) { }
}
impl<A> &[A]: MyIter<A> {
fn myeach(&self, blk: fn(v: &A) -> bool) { }
}
fn main() {
let v = ~[0];
for v.myeachi |_i, _j| { }
}
/home/brian/dev/rust/src/test/run-pass/test.rs:18:8: 18:17 error: failed to find an implementation of trait @MyIter<<V3>> for <V4>
/home/brian/dev/rust/src/test/run-pass/test.rs:18 for v.myeachi |_i, _j| { }