2024-02-16 14:02:50 -06:00
|
|
|
//@ edition: 2021
|
|
|
|
//@ check-pass
|
2024-01-26 11:00:28 -06:00
|
|
|
|
|
|
|
#![feature(async_closure)]
|
|
|
|
|
|
|
|
async fn foo() {}
|
|
|
|
|
|
|
|
async fn call_asyncly(f: impl async Fn(i32) -> i32) -> i32 {
|
|
|
|
f(1).await
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let fut = call_asyncly(|x| async move { x + 1 });
|
|
|
|
}
|