summaryrefslogtreecommitdiffstats
path: root/src/test/ui/impl-trait/impl-fn-parsing-ambiguities.rs
blob: 61303a5b2cb4a80379be44f06477414e50716e26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![feature(impl_trait_in_fn_trait_return)]
use std::fmt::Debug;

fn a() -> impl Fn(&u8) -> impl Debug + '_ {
    //~^ ERROR ambiguous `+` in a type
    //~| ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
    |x| x
}

fn b() -> impl Fn() -> impl Debug + Send {
    //~^ ERROR ambiguous `+` in a type
    || ()
}

fn main() {}