// check-pass use std::ops::Mul; fn main() {} trait Ring {} trait Real: Ring {} trait Module: Sized + Mul<::Ring, Output = Self> { type Ring: Ring; } trait EuclideanSpace { type Coordinates: Module; type Real: Real; } trait Translation { fn to_vector(&self) -> E::Coordinates; fn powf(&self, n: ::Ring) -> E::Coordinates { self.to_vector() * n } }