trait Foo { fn same_type(_: T, _: T); } fn f(x: X, y: Y) { T::same_type([x], Some(y)); //~^ ERROR mismatched types } fn main() {}