|
| 1 | +error[E0267]: `break` inside of an `async` function |
| 2 | + --> $DIR/break-inside-coroutine-issue-124495.rs:8:5 |
| 3 | + | |
| 4 | +LL | async fn async_fn() { |
| 5 | + | _____________________- |
| 6 | +LL | | break; |
| 7 | + | | ^^^^^ cannot `break` inside of an `async` function |
| 8 | +LL | | } |
| 9 | + | |_- enclosing `async` function |
| 10 | + |
| 11 | +error[E0267]: `break` inside of a `gen` function |
| 12 | + --> $DIR/break-inside-coroutine-issue-124495.rs:12:5 |
| 13 | + | |
| 14 | +LL | gen fn gen_fn() { |
| 15 | + | _________________- |
| 16 | +LL | | break; |
| 17 | + | | ^^^^^ cannot `break` inside of a `gen` function |
| 18 | +LL | | } |
| 19 | + | |_- enclosing `gen` function |
| 20 | + |
| 21 | +error[E0267]: `break` inside of an `async gen` function |
| 22 | + --> $DIR/break-inside-coroutine-issue-124495.rs:16:5 |
| 23 | + | |
| 24 | +LL | async gen fn async_gen_fn() { |
| 25 | + | _____________________________- |
| 26 | +LL | | break; |
| 27 | + | | ^^^^^ cannot `break` inside of an `async gen` function |
| 28 | +LL | | } |
| 29 | + | |_- enclosing `async gen` function |
| 30 | + |
| 31 | +error[E0267]: `break` inside of an `async` block |
| 32 | + --> $DIR/break-inside-coroutine-issue-124495.rs:20:21 |
| 33 | + | |
| 34 | +LL | let _ = async { break; }; |
| 35 | + | --------^^^^^--- |
| 36 | + | | | |
| 37 | + | | cannot `break` inside of an `async` block |
| 38 | + | enclosing `async` block |
| 39 | + |
| 40 | +error[E0267]: `break` inside of an `async` closure |
| 41 | + --> $DIR/break-inside-coroutine-issue-124495.rs:21:24 |
| 42 | + | |
| 43 | +LL | let _ = async || { break; }; |
| 44 | + | --^^^^^--- |
| 45 | + | | | |
| 46 | + | | cannot `break` inside of an `async` closure |
| 47 | + | enclosing `async` closure |
| 48 | + |
| 49 | +error[E0267]: `break` inside of a `gen` block |
| 50 | + --> $DIR/break-inside-coroutine-issue-124495.rs:23:19 |
| 51 | + | |
| 52 | +LL | let _ = gen { break; }; |
| 53 | + | ------^^^^^--- |
| 54 | + | | | |
| 55 | + | | cannot `break` inside of a `gen` block |
| 56 | + | enclosing `gen` block |
| 57 | + |
| 58 | +error[E0267]: `break` inside of an `async gen` block |
| 59 | + --> $DIR/break-inside-coroutine-issue-124495.rs:25:25 |
| 60 | + | |
| 61 | +LL | let _ = async gen { break; }; |
| 62 | + | ------------^^^^^--- |
| 63 | + | | | |
| 64 | + | | cannot `break` inside of an `async gen` block |
| 65 | + | enclosing `async gen` block |
| 66 | + |
| 67 | +error: aborting due to 7 previous errors |
| 68 | + |
| 69 | +For more information about this error, try `rustc --explain E0267`. |
0 commit comments