Closed
Description
I tried this code (aggressively simplified from Diesel, with which I originally encountered this bug):
trait Backend {
type RawValue;
}
trait FromSql<B: Backend> {}
impl<B: Backend<RawValue=()>> FromSql<B> for String {}
impl<B: Backend<RawValue=u8>> FromSql<B> for String {}
I expected to see this happen: this code compiles, because by definition nothing can implement both Backend<RawValue=()>
and Backend<RawValue=u8>
.
Instead, this happened: rustc gives error[E0119]: conflicting implementations of trait 'FromSql<_>' for type 'std::string::String'
Meta
This happens across stable/beta/nightly on the Rust playground.