2022-07-29 00:18:32 +04:00
|
|
|
#![feature(impl_trait_in_fn_trait_return)]
|
2022-06-23 19:12:13 +04:00
|
|
|
use std::fmt::Debug;
|
|
|
|
|
|
|
|
fn a<'a>() -> impl Fn(&'a u8) -> (impl Debug + '_) {
|
2024-06-26 16:01:38 +00:00
|
|
|
//~^ ERROR cannot resolve opaque type
|
2024-08-31 15:31:31 +03:00
|
|
|
//~| WARNING elided lifetime has a name
|
2022-06-23 19:12:13 +04:00
|
|
|
|x| x
|
2024-03-18 16:03:18 +00:00
|
|
|
//~^ ERROR expected generic lifetime parameter, found `'_`
|
2022-06-23 19:12:13 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
fn _b<'a>() -> impl Fn(&'a u8) -> (impl Debug + 'a) {
|
|
|
|
a()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|