summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/impl-fn-hrtb-bounds.rs
blob: 527a4586fd7e0b7cd8c02e97812418b0c68381b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#![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
}

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
}

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
    || ()
}

fn main() {}