Hi guys, need some help,
when I run this I get a conflicting implementation error:
trait MyTrait {
type inner: Clone;
}
#[derive(Clone)]
struct Cloneable {}
struct Ft {}
impl MyTrait for Ft {
type inner = Cloneable;
}
impl From<u8> for Ft {
fn from(value: u8) -> Ft {
todo!()
}
}
impl<T: MyTrait> From<T::inner> for Ft {
fn from(value: T::inner) -> Ft {
todo!()
}
}
fn main() {}
error:
error[E0119]: conflicting implementations of trait `From<Ft>` for type `Ft`
--> src/main.rs:20:1
|
20 | impl<T: MyTrait> From<T::inner> for Ft {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: conflicting implementation in crate `core`:
- impl<T> From<T> for T;
I am trying to understand why such an error occurs