Using the most recent thiserror, I am getting an error when trying to compile the following example:
use thiserror::Error;
trait AssocError {
type Error: std::error::Error;
}
#[derive(Error, Debug)]
pub enum MyExpandedError<A>
where
A: AssocError,
{
#[error("My Foo error")]
Foo,
#[error("Error from associated type")]
Assoc(#[from] A::Error),
}
And this is the error:
error[E0119]: conflicting implementations of trait `std::convert::From<MyExpandedError<_>>` for type `MyExpandedError<_>`:
--> src/lib.rs:7:10
|
7 | #[derive(Error, Debug)]
| ^^^^^
|
= note: conflicting implementation in crate `core`:
- impl<T> std::convert::From<T> for T;
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error
For more information about this error, try `rustc --explain E0119`.
error: could not compile `thiserror_from`.
Using the most recent
thiserror, I am getting an error when trying to compile the following example:And this is the error: