trait Add<RHS,Result> { ... }
trait Sub<RHS,Result> { ... }
trait Mul<RHS,Result> { ... }
trait Div<RHS,Result> { ... }
trait Rem<RHS,Result> { ... }
trait Neg<Result> { ... }
trait Not<Result> { ... }
trait BitAnd<RHS,Result> { ... }
trait BitOr<RHS,Result> { ... }
trait BitXor<RHS,Result> { ... }
trait Shl<RHS,Result> { ... }
trait Shr<RHS,Result> { ... }
All the type parameters here could get a = Self so that the common case is way less noisy to implement for types that are themselves parameterized.
Example from that reddit post:
impl<T: Add<T, T>> Add<Vec2<T>, Vec2<T>> for Vec2<T> { ... }
becomes
impl<T: Add> Add for Vec2<T> { ... }
I guess this can happen whenever since it’s backwards compatible, like default type parameters in general, though maybe we’re gonna come up with something better with where clauses and/or associated types by then.