According to the specialization RFC, I should be able to have multiple impls of the same trait on a struct by specifying one as default.
I have the code:
#![feature(specialization)]
struct A(u32);
trait Dummy {}
impl<T> From<T> for A
where
T: Into<u32>,
{
default fn from(item: T) -> Self {
A(item.into())
}
}
impl<T> From<T> for A
where
T: Dummy,
{
fn from(item: T) -> Self {
A(2)
}
}
Even though one of the implementations is default, the compiler still tells me that the two are conflicting implementations.