summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lub-glb/empty-binder-future-compat.rs
blob: 8700a88a36ea02908a83ba71ca1067df3ed4b806 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// check-pass
fn lt_in_fn_fn<'a: 'a>() -> fn(fn(&'a ())) {
    |_| ()
}


fn foo<'a, 'b, 'lower>(v: bool)
where
    'a: 'lower,
    'b: 'lower,
{
        // if we infer `x` to be higher ranked in the future,
        // this would cause a type error.
        let x = match v {
            true => lt_in_fn_fn::<'a>(),
            false => lt_in_fn_fn::<'b>(),
        };

        let _: fn(fn(&'lower())) = x;
}

fn main() {}