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 Permalink Normal View History

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