2024-02-16 20:02:50 +00:00
|
|
|
//@ edition:2018
|
2019-04-18 12:55:23 -07:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|