rust/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

191 lines
6.5 KiB
Plaintext
Raw Normal View History

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