The following code leads to an "overlapping impl" error despite the fact that the bool impl is clearly more specific (totally concrete).
#![feature(specialization)]
trait Encodable {
fn encode() {}
}
trait Decodable {
fn decode() {}
}
impl Encodable for bool {
fn encode() {}
}
impl Decodable for bool {
fn decode() {}
}
impl<D> Encodable for D where for<'a> &'a D: AsRef<[u8]> {
default fn encode() {}
}
impl<T: for<'a> From<&'a [u8]>> Decodable for T {
default fn decode() {}
}
The following code leads to an "overlapping impl" error despite the fact that the
boolimpl is clearly more specific (totally concrete).