Conflicting implementation : impl<T> From<T> for T can never conflict #124913
Labels
A-coherence
Area: Coherence
C-bug
Category: This is a bug.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Hello ! I found something that I think should be allowed in Rust.
I have 2 crates.
Until here, everything is alright. However, when trying to implement a simple From, things go sideways :
It says :
This is a very simplified example and I can't just implement From for SecondArgument for unrelated reasons.
I know you have to be careful about implementations of From with traits, but here everything is set in stone, I'm not using generic types. One argument could be that
<First as Test>::Exec
could be equal to Second Argument, but this is not possible because trait-def can't import theover
crate for circular dependency reasons.I have this repo that illustrates the situation (https://github.com/Kayanski/rust-trait-impl-reproduce)
The text was updated successfully, but these errors were encountered: