blob: fde35885c92081cc6c5a3e80a9ec9feb0125c8e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
A `yield` clause was used in an `async` context.
Erroneous code example:
```compile_fail,E0727,edition2018
#![feature(coroutines)]
fn main() {
let 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)]
fn main() {
let coroutine = || {
yield;
};
}
```
|