]> git.lizzy.rs Git - rust.git/blob - tests/ui/impl-trait/impl-fn-hrtb-bounds.rs
Rollup merge of #106661 - mjguzik:linux_statx, r=Mark-Simulacrum
[rust.git] / tests / ui / impl-trait / impl-fn-hrtb-bounds.rs
1 #![feature(impl_trait_in_fn_trait_return)]
2 use std::fmt::Debug;
3
4 fn a() -> impl Fn(&u8) -> (impl Debug + '_) {
5     //~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
6     |x| x
7 }
8
9 fn b() -> impl for<'a> Fn(&'a u8) -> (impl Debug + 'a) {
10     //~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
11     |x| x
12 }
13
14 fn c() -> impl for<'a> Fn(&'a u8) -> (impl Debug + '_) {
15     //~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
16     |x| x
17 }
18
19 fn d() -> impl Fn() -> (impl Debug + '_) {
20     //~^ ERROR missing lifetime specifier
21     || ()
22 }
23
24 fn main() {}