// run-rustfix use std::ops::Add; struct A(B); impl Add for A where B: Add { type Output = Self; fn add(self, rhs: Self) -> Self { A(self.0 + rhs.0) //~ ERROR mismatched types } } struct C(B); impl> Add for C { type Output = Self; fn add(self, rhs: Self) -> Self { Self(self.0 + rhs.0) //~ ERROR mismatched types } } struct D(B); impl> Add for D { type Output = Self; fn add(self, rhs: Self) -> Self { Self(self.0 + rhs.0) //~ ERROR cannot add `B` to `B` } } struct E(B); impl> Add for E where B: Add { //~^ ERROR equality constraints are not yet supported in `where` clauses type Output = Self; fn add(self, rhs: Self) -> Self { Self(self.0 + rhs.0) //~ ERROR mismatched types } } fn main() {}