Conflicting blanked implementations for distinct associated types

I was surprised the following gives a "conflicting implementations" error. What's the reason?

trait A {
    type M;
}

trait B { }
impl<T> B for T where T: A<M=u8> {}
impl<T> B for T where T: A<M=u16> {}

How could T implement A<M=u8> and A<M=u16>?

Looks like Can't write non-overlapping blanket impls that involve associated type bindings · Issue #20400 · rust-lang/rust · GitHub

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.