pandaman64/effective-rust

`cargo run` fails

Closed this issue · 2 comments

Description

cargo run --example print right after git clone fails.

Steps to Reproduce

  1. git clone this repository and type cd effective-rust.
  2. Type cargo run --example print.

Expected

It works and you see B\nA\n in your console.

Actual Result

error[E0061]: this method takes 1 argument but 0 arguments were supplied
   --> src/generator.rs:30:56
    |
30  |         set_task_context(cx, || match self.project().0.resume() {
    |                                                        ^^^^^^-- an argument of type `()` is missing
    |
note: method defined here
   --> /Users/<username>/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/generator.rs:114:8
    |
114 |     fn resume(self: Pin<&mut Self>, arg: R) -> GeneratorState<Self::Yie...
    |        ^^^^^^
help: provide the argument
    |
30  |         set_task_context(cx, || match self.project().0.resume(()) {
    |

Environment

  • cargo 1.73.0-nightly (694a57956 2023-07-11)
  • OS Info
    • ProductName: macOS
    • ProductVersion: 13.4.1
    • ProductVersionExtra: (c)
    • BuildVersion: 22F770820d

Additional Info

If I fix it according to the error message, it works, but the tests do not pass with the following errors;

warning: `eff` (lib) generated 6 warnings
   Compiling eff v0.1.0 (/Users/<username>/work/tmp/effective-rust)
error[E0277]: the trait bound `(): EmbedRest<!, _>` is not satisfied
  --> tests/frank_tee.rs:51:25
   |
51 |                         #[eff]
   |                         ^^^^^^
   |                         |
   |                         the trait `EmbedRest<!, _>` is not implemented for `()`
   |                         required by a bound introduced by this call
   |
   = note: required for `()` to implement `EmbedRest<eff::coproduct::Either<Abort, !>, Succ<_>>`
   = note: this error originates in the attribute macro `eff` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `(): EmbedRest<!, _>` is not satisfied
  --> tests/frank_tee.rs:46:17
   |
46 |                 #[eff]
   |                 ^^^^^^
   |                 |
   |                 the trait `EmbedRest<!, _>` is not implemented for `()`
   |                 required by a bound introduced by this call
   |
   = note: required for `()` to implement `EmbedRest<eff::coproduct::Either<Abort, !>, Succ<_>>`
   = note: this error originates in the attribute macro `eff` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `(): EmbedRest<!, _>` is not satisfied
  --> tests/frank_tee.rs:41:9
   |
41 |         #[eff]
   |         ^^^^^^
   |         |
   |         the trait `EmbedRest<!, _>` is not implemented for `()`
   |         required by a bound introduced by this call
   |
   = note: required for `()` to implement `EmbedRest<eff::coproduct::Either<Abort, !>, Succ<_>>`
   = note: this error originates in the attribute macro `eff` (in Nightly builds, run with -Z macro-backtrace for more info)

Sorry to hear that, but this library is a proof-of-concept which is made several years ago and lags behind the crate ecosystem by a lot (you can see it depends on pre 1.0 Tokio!).

Unfortunately, I don't have capacity to maintain the library for the foreseeable future, sorry!

I see. Thank you for creating this great library anyway.