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

13 lines
293 B
Rust
Raw Normal View History

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) -> IB) -> ~[B];
}
impl<A:Copy> BaseIter<A>: FlatMapToVec<A> {
fn flat_map_to_vec<B:Copy, IB:BaseIter<B>>(op: fn(A) -> IB) -> ~[B] {
iter::flat_map_to_vec(self, op)
2012-06-14 19:55:11 -05:00
}
}
fn main() {}