Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error: feature generators renamed to coroutines #10

Open
Mart-Bogdan opened this issue Jan 25, 2024 · 2 comments · May be fixed by #11
Open

Build error: feature generators renamed to coroutines #10

Mart-Bogdan opened this issue Jan 25, 2024 · 2 comments · May be fixed by #11

Comments

@Mart-Bogdan
Copy link

Build log:

error[E0557]: feature has been removed
  --> /home/bbbb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gen-iter-0.3.0/src/lib.rs:60:12
   |
60 | #![feature(generators, generator_trait)]
   |            ^^^^^^^^^^ feature has been removed
   |
   = note: renamed to `coroutines`
@Boscop
Copy link

Boscop commented Aug 8, 2024

Any update on this? :)

EDIT: This fork has the fix: https://github.com/arduano/gen-iter

Would be nice if @tinaun could publish a new version.

@Boscop
Copy link

Boscop commented Aug 8, 2024

Ah no, that fork doesn't work fully, we need to add #[coroutine]:

#[macro_export]
macro_rules! gen_iter {
    ($block: block) => {
        $crate::GenIter(#[coroutine] || $block)
    };
    (move $block: block) => {
        $crate::GenIter(#[coroutine] move || $block)
    };
}

and even then I get

error: yield can only be used in #[coroutine] closures, or gen blocks

when I actually try to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants