mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
16 lines
346 B
Rust
16 lines
346 B
Rust
#![feature(impl_trait_in_fn_trait_return)]
|
|
use std::fmt::Debug;
|
|
|
|
fn a() -> impl Fn(&u8) -> impl Debug + '_ {
|
|
//~^ ERROR ambiguous `+` in a type
|
|
//~| ERROR cannot capture higher-ranked lifetime from outer `impl Trait`
|
|
|x| x
|
|
}
|
|
|
|
fn b() -> impl Fn() -> impl Debug + Send {
|
|
//~^ ERROR ambiguous `+` in a type
|
|
|| ()
|
|
}
|
|
|
|
fn main() {}
|