2012-09-19 15:59:44 -05:00
|
|
|
// xfail-fast
|
2012-09-18 17:52:21 -05:00
|
|
|
#[legacy_modes];
|
|
|
|
|
2012-09-05 17:36:11 -05:00
|
|
|
use iter::BaseIter;
|
2012-06-14 19:55:11 -05:00
|
|
|
|
2012-09-05 17:36:11 -05:00
|
|
|
trait FlatMapToVec<A> {
|
2012-09-28 19:04:39 -05:00
|
|
|
fn flat_map_to_vec<B:Copy, IB:BaseIter<B>>(op: fn(+a: A) -> IB) -> ~[B];
|
2012-09-05 17:36:11 -05:00
|
|
|
}
|
|
|
|
|
2012-09-07 16:52:28 -05:00
|
|
|
impl<A:Copy> BaseIter<A>: FlatMapToVec<A> {
|
2012-09-28 19:04:39 -05:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-09-18 17:52:21 -05:00
|
|
|
fn main() {}
|