mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
12 lines
219 B
Rust
12 lines
219 B
Rust
// 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
|
|
}
|