1 // Test type checking of uses of associated types via sugary paths.
13 pub fn f1<T: Foo>(a: T, x: T::A) {}
14 pub fn f2<T: Foo>(a: T) -> T::A {
20 //~^ ERROR mismatched types
21 //~| expected u32, found i32
24 pub fn f1_int_uint() {
28 pub fn f1_uint_uint() {
30 //~^ ERROR `u32: Foo` is not satisfied
31 //~| ERROR `u32: Foo` is not satisfied
34 pub fn f1_uint_int() {
36 //~^ ERROR `u32: Foo` is not satisfied
37 //~| ERROR `u32: Foo` is not satisfied
41 let _: i32 = f2(2i32);
42 //~^ ERROR mismatched types
43 //~| expected i32, found u32