Provide From<E> for Box<dyn Error + Send> and Box<dyn Error + Sync> #62824
Labels
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
As explained in the Rust User forum, I noticed that the following impls are not available:
The first one is pretty useful when working with rayon and errors, which only need to be
Send
to be passed across threads. In theory, a stateful error with aCell
or aRefCell
is a possible example ofdyn Error + Send + !Sync
.The second impl is mainly for coherence and symmetry, I still do not have in mind a possible realistic situation.
In any case, IMHO this feature should not require a RFC. In that case I can create a PR and follow these steps:
It is the first time I contribute to Rust, and I am not sure if this feature should require a stabilization process. In this case just let me know, and I will update this document in order to include the addition of a feature gate and everything needed.
Any feedback is appreciated to make me do things nicely and your review less painful.
The text was updated successfully, but these errors were encountered: