rust/src/test/run-pass/issue-2611.rs

17 lines
335 B
Rust
Raw Normal View History

// xfail-fast
#[legacy_modes];
use iter::BaseIter;
2012-06-14 19:55:11 -05:00
trait FlatMapToVec<A> {
fn flat_map_to_vec<B:Copy, IB:BaseIter<B>>(op: fn(+a: A) -> IB) -> ~[B];
}
impl<A:Copy> BaseIter<A>: FlatMapToVec<A> {
fn flat_map_to_vec<B:Copy, IB:BaseIter<B>>(op: fn(+a: A) -> IB) -> ~[B] {
iter::flat_map_to_vec(&self, op)
2012-06-14 19:55:11 -05:00
}
}
fn main() {}