about summary refs log tree commit diff
path: root/tests/ui/async-await/async-fn/sugar.rs
blob: d00965ee647723214b8af5c90b4214aa4ccc1f47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ edition: 2021
//@ check-pass

#![feature(async_trait_bounds)]

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 });
}