You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Checking foo v0.1.0 (/Users/xiliangchen/projects/acala/trait-bug/foo)
error[E0119]: conflicting implementations of trait `From<Foo>` for type `Foo`
--> foo/src/lib.rs:11:1
|
11 | impl From<<baz::Baz as ::baz::BazTrait>::BazType> for Foo {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: conflicting implementation in crate `core`:
- impl<T> From<T> for T;
For more information about this error, try `rustc --explain E0119`.
error: could not compile `foo` (lib) due to previous error
Not exactly. <baz::Baz as ::baz::BazTrait>::BazType> is a concrete type that is always u32. Also the code compiles if baz::Baz is defined in the same crate.
I tried this code:
https://github.com/xlc/trait-bug
I expected to see this happen: compiles
Instead, this happened:
Meta
rustc --version --verbose
:Note that the code will compile if all the types are in a single crate.
The text was updated successfully, but these errors were encountered: