-
-
Notifications
You must be signed in to change notification settings - Fork 160
Closed
Description
Anyhow claims to support wrapping any implementor of std::error::Error, but error_chain's impl seems incompatible:
error[E0277]: `(dyn std::error::Error + std::marker::Send + 'static)` cannot be shared between threads safely
--> src/cli/main.rs:66:25
|
66 | utils::current_dir()?;
| ^ `(dyn std::error::Error + std::marker::Send + 'static)` cannot be shared between threads safely
|
= help: the trait `std::marker::Sync` is not implemented for `(dyn std::error::Error + std::marker::Send + 'static)`
= note: required because of the requirements on the impl of `std::marker::Sync` for `std::ptr::Unique<(dyn std::error::Error + std::marker::Send + 'static)>`
= note: required because it appears within the type `std::boxed::Box<(dyn std::error::Error + std::marker::Send + 'static)>`
= note: required because it appears within the type `std::option::Option<std::boxed::Box<(dyn std::error::Error + std::marker::Send + 'static)>>`
= note: required because it appears within the type `error_chain::State`
= note: required because it appears within the type `rustup::errors::Error`
= note: required because of the requirements on the impl of `std::convert::From<rustup::errors::Error>` for `anyhow::Error`
= note: required by `std::convert::From::from`
rust-lang-deprecated/error-chain#240 is presumably the underlying cause, but perhaps anyhow could do something on it's end via specialisation or using ?Send and ?Sync or something?
acshi
Metadata
Metadata
Assignees
Labels
No labels