Files
rust/tests/ui/coroutine/break-inside-coroutine-issue-124495.stderr

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

60 lines
1.9 KiB
Plaintext
Raw Normal View History

2024-05-05 17:39:07 -04:00
error[E0267]: `break` inside `async` function
2024-11-06 17:53:59 +00:00
--> $DIR/break-inside-coroutine-issue-124495.rs:6:5
2024-05-05 17:39:07 -04:00
|
2024-06-27 14:56:57 -04:00
LL | async fn async_fn() {
| ------------------- enclosing `async` function
LL | break;
| ^^^^^ cannot `break` inside `async` function
2024-05-05 17:39:07 -04:00
error[E0267]: `break` inside `gen` function
2024-11-06 17:53:59 +00:00
--> $DIR/break-inside-coroutine-issue-124495.rs:10:5
2024-05-05 17:39:07 -04:00
|
2024-06-27 14:56:57 -04:00
LL | gen fn gen_fn() {
| --------------- enclosing `gen` function
LL | break;
| ^^^^^ cannot `break` inside `gen` function
2024-05-05 17:39:07 -04:00
error[E0267]: `break` inside `async gen` function
2024-11-06 17:53:59 +00:00
--> $DIR/break-inside-coroutine-issue-124495.rs:14:5
2024-05-05 17:39:07 -04:00
|
2024-06-27 14:56:57 -04:00
LL | async gen fn async_gen_fn() {
| --------------------------- enclosing `async gen` function
LL | break;
| ^^^^^ cannot `break` inside `async gen` function
2024-05-05 17:39:07 -04:00
error[E0267]: `break` inside `async` block
2024-11-06 17:53:59 +00:00
--> $DIR/break-inside-coroutine-issue-124495.rs:18:21
2024-05-05 17:39:07 -04:00
|
LL | let _ = async { break; };
2024-06-27 14:56:57 -04:00
| ----- ^^^^^ cannot `break` inside `async` block
| |
2024-05-05 17:39:07 -04:00
| enclosing `async` block
error[E0267]: `break` inside `async` closure
2024-11-06 17:53:59 +00:00
--> $DIR/break-inside-coroutine-issue-124495.rs:20:24
2024-05-05 17:39:07 -04:00
|
LL | let _ = async || { break; };
2024-06-27 14:56:57 -04:00
| -------- ^^^^^ cannot `break` inside `async` closure
| |
| enclosing `async` closure
2024-05-05 17:39:07 -04:00
error[E0267]: `break` inside `gen` block
2024-11-06 17:53:59 +00:00
--> $DIR/break-inside-coroutine-issue-124495.rs:22:19
2024-05-05 17:39:07 -04:00
|
LL | let _ = gen { break; };
2024-06-27 14:56:57 -04:00
| --- ^^^^^ cannot `break` inside `gen` block
| |
2024-05-05 17:39:07 -04:00
| enclosing `gen` block
error[E0267]: `break` inside `async gen` block
2024-11-06 17:53:59 +00:00
--> $DIR/break-inside-coroutine-issue-124495.rs:24:25
2024-05-05 17:39:07 -04:00
|
LL | let _ = async gen { break; };
2024-06-27 14:56:57 -04:00
| --------- ^^^^^ cannot `break` inside `async gen` block
| |
2024-05-05 17:39:07 -04:00
| enclosing `async gen` block
error: aborting due to 7 previous errors
For more information about this error, try `rustc --explain E0267`.