PLAYGROUND:(Playground)
In the example below, not for my structure, not for My trait, T do not need to implement Into. This mistake seems to me Absurd. I would like to know the general solutions to this error. AND THE MAIN THING: does this error appear because of the compiler's guesses that T implements Into?
Code:
fn main() {}
trait MyTrait{}
struct MyStruct{}
impl<T> TryFrom<T> for MyStruct
where
T: MyTrait
{
}
Error:
Compiling playground v0.0.1 (/playground)
error[E0119]: conflicting implementations of trait TryFrom<_>for type MyStruct
--> src/main.rs:8:1
|
8 | impl<T> TryFrom<T> for MyStruct
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: conflicting implementation in crate core:
- impl<T, U> TryFrom<U> for T
where U: Into<T>;
For more information about this error, try rustc --explain E0119.
error: could not compile playground due to previous error