2022-07-28 15:18:32 -05:00
|
|
|
#![feature(impl_trait_in_fn_trait_return)]
|
2022-06-23 10:00:03 -05:00
|
|
|
use std::fmt::Debug;
|
|
|
|
|
|
|
|
fn a() -> impl Fn(&u8) -> impl Debug + '_ {
|
|
|
|
//~^ ERROR ambiguous `+` in a type
|
2024-03-07 09:44:07 -06:00
|
|
|
//~| ERROR cannot capture higher-ranked lifetime from outer `impl Trait`
|
2022-06-23 10:00:03 -05:00
|
|
|
|x| x
|
|
|
|
}
|
|
|
|
|
|
|
|
fn b() -> impl Fn() -> impl Debug + Send {
|
|
|
|
//~^ ERROR ambiguous `+` in a type
|
|
|
|
|| ()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|