You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
That3Percent
changed the title
? does not coerce Box<dyn Error + Send + Sync + 'static> to anyhow::Error
? does not coerce Box<dyn Error + Send + Sync + 'static> to anyhow::Error
Feb 13, 2020
I don't think this is something that could be fixed in anyhow. There is a missing impl of std::error::Error for Box<dyn Error> in std -- rust-lang/rust#60759. Once specialization is mature enough that the missing impl can be provided in std, it will fix this issue.
It is common in crates that take the anyhow approach of loosely typed dynamic error types to return
Result<T, Box<dyn Error + Send + Sync + 'static>>
.Like anyhow, this type is convenient to use - automatically coercing from
impl Error
and evenString
.But, when trying to interop with this common return value using
?
the compiler stumbles with:Here is a minimum reproducible case:
The text was updated successfully, but these errors were encountered: