mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
15 lines
221 B
Rust
15 lines
221 B
Rust
//@ known-bug: rust-lang/rust#125841
|
|
#![feature(non_lifetime_binders)]
|
|
fn take(id: impl for<T> Fn(T) -> T) {
|
|
id(0);
|
|
id("");
|
|
}
|
|
|
|
fn take2() -> impl for<T> Fn(T) -> T {
|
|
|x| x
|
|
}
|
|
|
|
fn main() {
|
|
take(|x| take2)
|
|
}
|