2022-06-23 19:00:03 +04:00
|
|
|
use std::fmt::Debug;
|
|
|
|
|
|
|
|
fn a() -> impl Fn(&u8) -> (impl Debug + '_) {
|
|
|
|
//~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
|
|
|
|
|x| x
|
|
|
|
}
|
|
|
|
|
|
|
|
fn b() -> impl for<'a> Fn(&'a u8) -> (impl Debug + 'a) {
|
|
|
|
//~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
|
|
|
|
|x| x
|
|
|
|
}
|
|
|
|
|
2022-06-23 19:12:13 +04:00
|
|
|
fn c() -> impl for<'a> Fn(&'a u8) -> (impl Debug + '_) {
|
|
|
|
//~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
|
|
|
|
|x| x
|
|
|
|
}
|
|
|
|
|
|
|
|
fn d() -> impl Fn() -> (impl Debug + '_) {
|
|
|
|
//~^ ERROR missing lifetime specifier
|
|
|
|
|| ()
|
|
|
|
}
|
|
|
|
|
2022-06-23 19:00:03 +04:00
|
|
|
fn main() {}
|