blob: bedb7a1907d613609e1bc11659f13afe62ceaa9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
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() {}
|