E0290
Two impl Trait for Type that overlap: some instantiation of each implements the same trait, with the same arguments, for the same type, as with impl<T> Display for Box<T> and impl Display for Box<Int>. An impl that overlaps a prelude impl, such as impl Eq for Int, conflicts too. Spans the second impl's trait.
Machine-applicable fix: none.
Example
This program fails with E0290.
struct Box<T> { value: T }
impl<T> Display for Box<T> {
fn to_string(self) -> String {
"box"
}
}
impl Display for Box<Int> {
fn to_string(self) -> String {
"int box"
}
}
Fixed
The same program, fixed.
struct Box<T> { value: T }
impl<T> Display for Box<T> {
fn to_string(self) -> String {
"box"
}
}
Listed in the checker notes. oskac explain E0290 prints this entry offline.