Compilation failed because "error[E0700]: hidden type for 'impl Trait' captures lifetime that does not appear in bounds"
Description
Tried running a rust API server in a docker container, but it fails to run because zbus v2.3.1 doesn't compile. Could also be an issue on my end but I'm totally lost as to what is going on here.
How to reproduce
- clone https://github.com/snamiki1212/realworld-v1-rust-actix-web-diesel
sh ./scripts/copy-env.sh
docker compose up -d
Console output
Compiling zbus v2.3.1
error[E0700]: hidden type for 'impl Trait' captures lifetime that does not appear in bounds
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/zbus-2.3.1/src/object_server.rs:464:10
|
| ) -> Result
| ^^^^^^^^^^^^
|
note: hidden type 'impl futures_core::Future' captures lifetime smaller than the function body
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/zbus-2.3.1/src/object_server.rs:464:10
|
| ) -> Result
| ^^^^^^^^^^^^
For more information about this error, try 'rustc --explain E0700'.
error: failed to compile 'cargo-watch v8.1.1', intermediate artifacts can be found at '/tmp/cargo-installzbZPlx'
Caused by:
could not compile 'zbus' due to previous error