blob: bedb7a1907d613609e1bc11659f13afe62ceaa9f [file] [log] [blame]
pub trait Insertable {
type Values;
fn values(&self) -> Self::Values;
}
impl<T> Insertable for Option<T> {
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() {}