mirror of https://github.com/rust-lang/rust
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`.
|