2019-04-18 14:55:23 -05:00
|
|
|
error[E0728]: `await` is only allowed inside `async` functions and blocks
|
2019-08-01 20:48:43 -05:00
|
|
|
--> $DIR/issue-51751.rs:9:20
|
2019-04-18 14:55:23 -05:00
|
|
|
|
|
2019-05-16 15:17:40 -05:00
|
|
|
LL | fn main() {
|
|
|
|
| ---- this is not `async`
|
|
|
|
LL | let result = inc(10000);
|
2019-04-18 14:55:23 -05:00
|
|
|
LL | let finished = result.await;
|
2019-05-15 21:47:18 -05:00
|
|
|
| ^^^^^^^^^^^^ only allowed inside `async` functions and blocks
|
2019-04-18 14:55:23 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|