Closed aldanor closed 3 years ago
As far as I know this isn't possible to implement for eyre::Report
because we impl From<E: Error> for Report
.
Though honestly the error I'm getting isn't the one I expected. I expected it to produce a future incompatibility error indicating that Infallible
could introduce an Error
imp in the future, but it just seems to indicate that there is overlap. Not sure what that means. I know that there's a debate over whether Infallible
/!
should be able to satisfy any trait bound, so this may be some compiler hacks that prevent users from depending on Infallible
not implementing certain traits or it may be something completely diff that I don't fully understand. Either way though I don't see a way to accomplish this.
If we do decide to make Infallible
/!
satisfy any trait bound then this should just work automatically, since Infallible
would be a valid parameter for the From
impl that already exists on Report
.
@yaahc Thanks a million for clarifying, that makes sense! (closing this)
Similar e.g. to: https://doc.rust-lang.org/src/core/num/error.rs.html#32-36
IIUC, this will allow using
TryInto
with eyre error type where blanket impls (likeFrom
->TryFrom
) may returnInfallible
as the error type?