about summary refs log tree commit diff
path: root/tests/ui/async-await/issues/issue-51751.rs
blob: 7c405e3653b3edc7905a315264539b6a3070f7a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
//@ edition:2018

async fn inc(limit: i64) -> i64 {
    limit + 1
}

fn main() {
    let result = inc(10000);
    let finished = result.await;
    //~^ ERROR `await` is only allowed inside `async` functions and blocks
}