1 2 3 4 5 6 7 8 9 10 11 12 13 14
struct S<T> { t: T, } fn foo<T>(x: T) -> S<T> { S { t: x } } fn bar() { foo(4 as usize) //~^ ERROR mismatched types } fn main() {}