aef0f4024a
And suggest adding the `#[coroutine]` to the closure
16 lines
464 B
Plaintext
16 lines
464 B
Plaintext
error: `yield` can only be used in `#[coroutine]` closures, or `gen` blocks
|
|
--> $DIR/yield-in-const.rs:3:17
|
|
|
|
|
LL | const A: u8 = { yield 3u8; 3u8};
|
|
| ^^^^^^^^^
|
|
|
|
error[E0627]: yield expression outside of coroutine literal
|
|
--> $DIR/yield-in-const.rs:3:17
|
|
|
|
|
LL | const A: u8 = { yield 3u8; 3u8};
|
|
| ^^^^^^^^^
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0627`.
|