summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-19135.rs
blob: 84540a3ff5feac10f422d60367f863ff49023d3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-pass
use std::marker::PhantomData;

#[derive(Debug)]
struct LifetimeStruct<'a>(PhantomData<&'a ()>);

fn main() {
    takes_hrtb_closure(|lts| println!("{:?}", lts));
}

fn takes_hrtb_closure<F: for<'a>FnMut(LifetimeStruct<'a>)>(mut f: F) {
    f(LifetimeStruct(PhantomData));
}