pub trait Insertable { type Values; fn values(&self) -> Self::Values; } impl Insertable for Option { type Values = (); fn values(self) -> Self::Values { //~^ ERROR method `values` has an incompatible type for trait self.map(Insertable::values).unwrap_or_default() //~^ ERROR type mismatch in function arguments } } fn main() {}