]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issues/issue-51751.rs
Rollup merge of #71627 - ldm0:autoderefarg, r=Dylan-DPC
[rust.git] / src / test / ui / async-await / issues / issue-51751.rs
1 // edition:2018
2
3 async fn inc(limit: i64) -> i64 {
4     limit + 1
5 }
6
7 fn main() {
8     let result = inc(10000);
9     let finished = result.await;
10     //~^ ERROR `await` is only allowed inside `async` functions and blocks
11 }