summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/issues/issue-67830.rs
blob: 92f7e005dbf0c26ea7479e9807d62f3310a0dadf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
trait MyFn<Arg> {
    type Output;
    fn call(&self, arg: Arg) -> Self::Output;
}

struct Wrap<F>(F);

impl<A, B, F> MyFn<A> for Wrap<F>
where
    F: Fn(A) -> B
{
    type Output = B;

    fn call(&self, arg: A) -> Self::Output {
        (self.0)(arg)
    }
}


struct A;
fn test() -> impl for<'a> MyFn<&'a A, Output=impl Iterator + 'a> {
    //~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
    Wrap(|a| Some(a).into_iter())
}

fn main() {}