mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
28 lines
792 B
Rust
28 lines
792 B
Rust
#![feature(impl_trait_in_fn_trait_return)]
|
|
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
|
|
//~^ ERROR lifetime may not live long enough
|
|
}
|
|
|
|
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
|
|
//~^ ERROR lifetime may not live long enough
|
|
}
|
|
|
|
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
|
|
//~^ ERROR lifetime may not live long enough
|
|
}
|
|
|
|
fn d() -> impl Fn() -> (impl Debug + '_) {
|
|
//~^ ERROR missing lifetime specifier
|
|
|| ()
|
|
}
|
|
|
|
fn main() {}
|