]> git.lizzy.rs Git - rust.git/blob - tests/ui/lub-glb/empty-binder-future-compat.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / lub-glb / empty-binder-future-compat.rs
1 // check-pass
2 fn lt_in_fn_fn<'a: 'a>() -> fn(fn(&'a ())) {
3     |_| ()
4 }
5
6
7 fn foo<'a, 'b, 'lower>(v: bool)
8 where
9     'a: 'lower,
10     'b: 'lower,
11 {
12         // if we infer `x` to be higher ranked in the future,
13         // this would cause a type error.
14         let x = match v {
15             true => lt_in_fn_fn::<'a>(),
16             false => lt_in_fn_fn::<'b>(),
17         };
18
19         let _: fn(fn(&'lower())) = x;
20 }
21
22 fn main() {}