2024-04-11 13:15:34 +00:00
error: `yield` can only be used in `#[coroutine]` closures, or `gen` blocks
--> $DIR/yield-outside-coroutine-issue-78653.rs:4:5
|
LL | yield || for i in 0 { }
| ^^^^^^^^^^^^^^^^^^^^^^^
|
help: use `#[coroutine]` to make this closure a coroutine
|
LL | #[coroutine] fn main() {
| ++++++++++++
2023-10-19 21:46:28 +00:00
error[E0627]: yield expression outside of coroutine literal
2023-10-20 10:06:08 +00:00
--> $DIR/yield-outside-coroutine-issue-78653.rs:4:5
2021-02-18 04:44:00 +00:00
|
LL | yield || for i in 0 { }
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: `{integer}` is not an iterator
2023-10-20 10:06:08 +00:00
--> $DIR/yield-outside-coroutine-issue-78653.rs:4:23
2021-02-18 04:44:00 +00:00
|
LL | yield || for i in 0 { }
| ^ `{integer}` is not an iterator
|
2024-10-24 21:14:17 +00:00
= help: the trait `Iterator` is not implemented for `{integer}`
2021-02-18 04:44:00 +00:00
= note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
2022-08-15 20:31:37 +00:00
= note: required for `{integer}` to implement `IntoIterator`
2021-02-18 04:44:00 +00:00
2024-04-11 13:15:34 +00:00
error: aborting due to 3 previous errors
2021-02-18 04:44:00 +00:00
Some errors have detailed explanations: E0277, E0627.
For more information about an error, try `rustc --explain E0277`.