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

Unable to compile program: no FnBox in boxed #77

Closed
mjarkk opened this issue Apr 27, 2020 · 3 comments
Closed

Unable to compile program: no FnBox in boxed #77

mjarkk opened this issue Apr 27, 2020 · 3 comments

Comments

@mjarkk
Copy link

mjarkk commented Apr 27, 2020

When i try to compile my program that includes this library i get the following error:
image

Dependencies in Cargo.toml

[dependencies]
reqwest = { version = "0.10", features = ["blocking", "json"] }
tokio = { version = "0.2", features = ["full"] }
serde = {version = "1.0.106", features = ["derive"]}
rustc-serialize = "0.3.24"
coroutine = "0.8"

rustup show:

Default host: x86_64-unknown-linux-gnu
rustup home:  /home/mark/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu (default)

active toolchain
----------------

nightly-x86_64-unknown-linux-gnu (default)
rustc 1.44.0-nightly (b2e36e6c2 2020-04-22)

Code used for testing:

fn main() {
  Coroutine::spawn(|me,_| {
    loop {
      thread::sleep(Duration::from_secs(1));
      println!("Hello 2");
    }
  });
  loop {
      thread::sleep(Duration::from_secs(1));
      println!("Hello 1");
  }
}

I'm very new to rust and i'm not yet sure how everything works so please be nice 🥺

@Draphar
Copy link

Draphar commented Apr 27, 2020

This library has not been updated in nearly two years and is using a removed feature. However there has been a lot of progress during these two years, take a look at https://doc.rust-lang.org/nightly/unstable-book/language-features/generators.html for the current state of generators. You are already using nightly so it should not be a problem to use the native Rust solution instead of this dead library.

@zonyitoo
Copy link
Contributor

Yup. I suggest you to use Rust's builtin coroutines.

@mjarkk
Copy link
Author

mjarkk commented Apr 27, 2020

Thanks!, I'll see if i can use those.

@mjarkk mjarkk closed this as completed Apr 27, 2020
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

No branches or pull requests

3 participants