2019-05-15 19:47:18 -07:00
|
|
|
error: incorrect use of `await`
|
2019-08-02 03:48:43 +02:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:8:13
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
|
LL | let _ = await bar();
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: `await` is a postfix operation
|
|
|
|
|
|
2024-07-11 22:07:11 +00:00
|
|
|
LL - let _ = await bar();
|
|
|
|
LL + let _ = bar().await;
|
|
|
|
|
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
error: incorrect use of `await`
|
2019-08-02 03:48:43 +02:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:12:13
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
|
LL | let _ = await? bar();
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: `await` is a postfix operation
|
|
|
|
|
|
2024-07-11 22:07:11 +00:00
|
|
|
LL - let _ = await? bar();
|
|
|
|
LL + let _ = bar().await?;
|
|
|
|
|
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
error: incorrect use of `await`
|
2019-08-02 03:48:43 +02:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:16:13
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
|
LL | let _ = await bar()?;
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: `await` is a postfix operation
|
|
|
|
|
|
2024-07-11 22:07:11 +00:00
|
|
|
LL - let _ = await bar()?;
|
|
|
|
LL + let _ = bar()?.await;
|
|
|
|
|
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
error: incorrect use of `await`
|
2020-10-22 10:51:49 -07:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:20:13
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
|
LL | let _ = await { bar() };
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: `await` is a postfix operation
|
|
|
|
|
|
2024-07-11 22:07:11 +00:00
|
|
|
LL - let _ = await { bar() };
|
|
|
|
LL + let _ = { bar() }.await;
|
|
|
|
|
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
error: incorrect use of `await`
|
2020-10-22 10:51:49 -07:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:24:13
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
|
LL | let _ = await(bar());
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: `await` is a postfix operation
|
|
|
|
|
|
2024-07-11 22:07:11 +00:00
|
|
|
LL - let _ = await(bar());
|
|
|
|
LL + let _ = (bar()).await;
|
|
|
|
|
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
error: incorrect use of `await`
|
2020-10-22 10:51:49 -07:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:28:13
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
|
LL | let _ = await { bar() }?;
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: `await` is a postfix operation
|
|
|
|
|
|
2024-07-11 22:07:11 +00:00
|
|
|
LL - let _ = await { bar() }?;
|
|
|
|
LL + let _ = { bar() }.await?;
|
|
|
|
|
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
error: incorrect use of `await`
|
2020-10-22 10:51:49 -07:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:32:14
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
|
LL | let _ = (await bar())?;
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: `await` is a postfix operation
|
|
|
|
|
|
2024-07-11 22:07:11 +00:00
|
|
|
LL - let _ = (await bar())?;
|
|
|
|
LL + let _ = (bar().await)?;
|
|
|
|
|
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
error: incorrect use of `await`
|
2020-10-22 10:51:49 -07:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:36:24
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
|
LL | let _ = bar().await();
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
help: `await` is not a method call, remove the parentheses
|
|
|
|
|
|
|
|
|
LL - let _ = bar().await();
|
|
|
|
LL + let _ = bar().await;
|
|
|
|
|
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
error: incorrect use of `await`
|
2020-10-22 10:51:49 -07:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:40:24
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
|
LL | let _ = bar().await()?;
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
help: `await` is not a method call, remove the parentheses
|
|
|
|
|
|
|
|
|
LL - let _ = bar().await()?;
|
|
|
|
LL + let _ = bar().await?;
|
|
|
|
|
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
error: incorrect use of `await`
|
2020-10-22 10:51:49 -07:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:52:13
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
|
LL | let _ = await bar();
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: `await` is a postfix operation
|
|
|
|
|
|
2024-07-11 22:07:11 +00:00
|
|
|
LL - let _ = await bar();
|
|
|
|
LL + let _ = bar().await;
|
|
|
|
|
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
error: incorrect use of `await`
|
2023-08-08 10:51:35 +08:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:56:13
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
|
LL | let _ = await? bar();
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: `await` is a postfix operation
|
|
|
|
|
|
2024-07-11 22:07:11 +00:00
|
|
|
LL - let _ = await? bar();
|
|
|
|
LL + let _ = bar().await?;
|
|
|
|
|
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
error: incorrect use of `await`
|
2023-08-08 10:51:35 +08:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:60:13
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
|
LL | let _ = await bar()?;
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: `await` is a postfix operation
|
|
|
|
|
|
2024-07-11 22:07:11 +00:00
|
|
|
LL - let _ = await bar()?;
|
|
|
|
LL + let _ = bar()?.await;
|
|
|
|
|
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
error: incorrect use of `await`
|
2023-08-08 10:51:35 +08:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:64:14
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
|
LL | let _ = (await bar())?;
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: `await` is a postfix operation
|
|
|
|
|
|
2024-07-11 22:07:11 +00:00
|
|
|
LL - let _ = (await bar())?;
|
|
|
|
LL + let _ = (bar().await)?;
|
|
|
|
|
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
error: incorrect use of `await`
|
2023-08-08 10:51:35 +08:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:68:24
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
|
LL | let _ = bar().await();
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
help: `await` is not a method call, remove the parentheses
|
|
|
|
|
|
|
|
|
LL - let _ = bar().await();
|
|
|
|
LL + let _ = bar().await;
|
|
|
|
|
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
error: incorrect use of `await`
|
2023-08-08 10:51:35 +08:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:73:24
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
|
LL | let _ = bar().await()?;
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
help: `await` is not a method call, remove the parentheses
|
|
|
|
|
|
|
|
|
LL - let _ = bar().await()?;
|
|
|
|
LL + let _ = bar().await?;
|
|
|
|
|
|
2019-05-15 19:47:18 -07:00
|
|
|
|
2019-07-02 06:46:35 +02:00
|
|
|
error: incorrect use of `await`
|
2023-08-08 10:51:35 +08:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:101:13
|
2019-07-02 06:46:35 +02:00
|
|
|
|
|
|
|
|
LL | let _ = await!(bar());
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: `await` is a postfix operation
|
|
|
|
|
|
2024-07-11 22:07:11 +00:00
|
|
|
LL - let _ = await!(bar());
|
|
|
|
LL + let _ = bar().await);
|
|
|
|
|
|
2019-07-02 06:46:35 +02:00
|
|
|
|
|
|
|
error: incorrect use of `await`
|
2023-08-08 10:51:35 +08:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:105:13
|
2019-07-02 06:46:35 +02:00
|
|
|
|
|
|
|
|
LL | let _ = await!(bar())?;
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: `await` is a postfix operation
|
|
|
|
|
|
2024-07-11 22:07:11 +00:00
|
|
|
LL - let _ = await!(bar())?;
|
|
|
|
LL + let _ = bar().await)?;
|
|
|
|
|
|
2019-07-02 06:46:35 +02:00
|
|
|
|
|
|
|
error: incorrect use of `await`
|
2023-08-08 10:51:35 +08:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:110:17
|
2019-07-02 06:46:35 +02:00
|
|
|
|
|
|
|
|
LL | let _ = await!(bar())?;
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: `await` is a postfix operation
|
|
|
|
|
|
2024-07-11 22:07:11 +00:00
|
|
|
LL - let _ = await!(bar())?;
|
|
|
|
LL + let _ = bar().await)?;
|
|
|
|
|
|
2019-07-02 06:46:35 +02:00
|
|
|
|
|
|
|
error: incorrect use of `await`
|
2023-08-08 10:51:35 +08:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:117:17
|
2019-07-02 06:46:35 +02:00
|
|
|
|
|
|
|
|
LL | let _ = await!(bar())?;
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: `await` is a postfix operation
|
|
|
|
|
|
2024-07-11 22:07:11 +00:00
|
|
|
LL - let _ = await!(bar())?;
|
|
|
|
LL + let _ = bar().await)?;
|
|
|
|
|
|
2019-07-02 06:46:35 +02:00
|
|
|
|
2019-05-16 13:20:06 -07:00
|
|
|
error: expected expression, found `=>`
|
2023-08-08 10:51:35 +08:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:124:25
|
2019-05-16 13:20:06 -07:00
|
|
|
|
|
|
|
|
LL | match await { await => () }
|
|
|
|
| ----- ^^ expected expression
|
|
|
|
| |
|
2019-05-16 13:33:26 -07:00
|
|
|
| while parsing this incorrect await expression
|
2019-05-16 13:20:06 -07:00
|
|
|
|
|
|
|
error: incorrect use of `await`
|
2023-08-08 10:51:35 +08:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:124:11
|
2019-05-16 13:20:06 -07:00
|
|
|
|
|
|
|
|
LL | match await { await => () }
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: `await` is a postfix operation
|
|
|
|
|
|
2024-07-11 22:07:11 +00:00
|
|
|
LL - match await { await => () }
|
|
|
|
LL + match { await => () }.await
|
|
|
|
|
|
2019-05-16 13:20:06 -07:00
|
|
|
|
|
|
|
error: expected one of `.`, `?`, `{`, or an operator, found `}`
|
2023-08-08 10:51:35 +08:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:127:1
|
2019-05-16 13:20:06 -07:00
|
|
|
|
|
|
|
|
LL | match await { await => () }
|
2019-10-28 11:08:53 -07:00
|
|
|
| ----- - expected one of `.`, `?`, `{`, or an operator
|
2019-05-16 13:20:06 -07:00
|
|
|
| |
|
2022-01-12 20:43:24 +00:00
|
|
|
| while parsing this `match` expression
|
2019-05-16 13:20:06 -07:00
|
|
|
...
|
|
|
|
LL | }
|
|
|
|
| ^ unexpected token
|
|
|
|
|
2019-05-15 19:47:18 -07:00
|
|
|
error[E0728]: `await` is only allowed inside `async` functions and blocks
|
2023-08-08 10:51:35 +08:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:68:19
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
2019-05-16 13:17:40 -07:00
|
|
|
LL | fn foo13() -> Result<(), ()> {
|
2024-04-11 13:15:34 +00:00
|
|
|
| ---------------------------- this is not `async`
|
2019-05-15 19:47:18 -07:00
|
|
|
LL | let _ = bar().await();
|
2023-04-25 18:59:16 +00:00
|
|
|
| ^^^^^ only allowed inside `async` functions and blocks
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
error[E0728]: `await` is only allowed inside `async` functions and blocks
|
2023-08-08 10:51:35 +08:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:73:19
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
2019-05-16 13:17:40 -07:00
|
|
|
LL | fn foo14() -> Result<(), ()> {
|
2024-04-11 13:15:34 +00:00
|
|
|
| ---------------------------- this is not `async`
|
2019-05-15 19:47:18 -07:00
|
|
|
LL | let _ = bar().await()?;
|
2023-04-25 18:59:16 +00:00
|
|
|
| ^^^^^ only allowed inside `async` functions and blocks
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
error[E0728]: `await` is only allowed inside `async` functions and blocks
|
2023-08-08 10:51:35 +08:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:78:19
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
2019-05-16 13:17:40 -07:00
|
|
|
LL | fn foo15() -> Result<(), ()> {
|
2024-04-11 13:15:34 +00:00
|
|
|
| ---------------------------- this is not `async`
|
2019-05-15 19:47:18 -07:00
|
|
|
LL | let _ = bar().await;
|
2023-04-25 18:59:16 +00:00
|
|
|
| ^^^^^ only allowed inside `async` functions and blocks
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
|
|
error[E0728]: `await` is only allowed inside `async` functions and blocks
|
2023-08-08 10:51:35 +08:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:82:19
|
2019-05-15 19:47:18 -07:00
|
|
|
|
|
2019-05-16 13:17:40 -07:00
|
|
|
LL | fn foo16() -> Result<(), ()> {
|
2024-04-11 13:15:34 +00:00
|
|
|
| ---------------------------- this is not `async`
|
2019-05-15 19:47:18 -07:00
|
|
|
LL | let _ = bar().await?;
|
2023-04-25 18:59:16 +00:00
|
|
|
| ^^^^^ only allowed inside `async` functions and blocks
|
2019-05-15 19:47:18 -07:00
|
|
|
|
2019-05-16 13:17:40 -07:00
|
|
|
error[E0728]: `await` is only allowed inside `async` functions and blocks
|
2023-08-08 10:51:35 +08:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:87:23
|
2019-05-16 13:17:40 -07:00
|
|
|
|
|
|
|
|
LL | fn foo() -> Result<(), ()> {
|
2024-04-11 13:15:34 +00:00
|
|
|
| -------------------------- this is not `async`
|
2019-05-16 13:17:40 -07:00
|
|
|
LL | let _ = bar().await?;
|
2023-04-25 18:59:16 +00:00
|
|
|
| ^^^^^ only allowed inside `async` functions and blocks
|
2019-05-16 13:17:40 -07:00
|
|
|
|
|
|
|
error[E0728]: `await` is only allowed inside `async` functions and blocks
|
2023-08-08 10:51:35 +08:00
|
|
|
--> $DIR/incorrect-syntax-suggestions.rs:94:23
|
2019-05-16 13:17:40 -07:00
|
|
|
|
|
|
|
|
LL | let foo = || {
|
|
|
|
| -- this is not `async`
|
|
|
|
LL | let _ = bar().await?;
|
2023-04-25 18:59:16 +00:00
|
|
|
| ^^^^^ only allowed inside `async` functions and blocks
|
2019-05-16 13:17:40 -07:00
|
|
|
|
2023-08-08 10:51:35 +08:00
|
|
|
error: aborting due to 28 previous errors
|
2019-05-15 19:47:18 -07:00
|
|
|
|
2020-10-22 10:51:49 -07:00
|
|
|
For more information about this error, try `rustc --explain E0728`.
|