summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/missing-lt-for-hrtb.rs
blob: 04ea3d831c93a9cd6b595d9fff8335208ed6bc67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
struct X<'a>(&'a ());
struct S<'a>(&'a dyn Fn(&X) -> &X);
//~^ ERROR missing lifetime specifiers
struct V<'a>(&'a dyn for<'b> Fn(&X) -> &X);
//~^ ERROR missing lifetime specifiers

fn main() {
    let x = S(&|x| {
        println!("hi");
        x
    });
    x.0(&X(&()));
}