blob: 7754186508f111a4cab8ada1ebf630f08971eb77 [file] [log] [blame] [view]
A `yield` clause was used in an `async` context.
Erroneous code example:
```compile_fail,E0727,edition2018
#![feature(coroutines, stmt_expr_attributes)]
fn main() {
let coroutine = #[coroutine] || {
async {
yield;
}
};
}
```
Here, the `yield` keyword is used in an `async` block,
which is not yet supported.
To fix this error, you have to move `yield` out of the `async` block:
```edition2018
#![feature(coroutines, stmt_expr_attributes)]
fn main() {
let coroutine = #[coroutine] || {
yield;
};
}
```