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
32 //~| ERROR `u32: Foo` is not satisfied
35 pub fn f1_uint_int() {
37 //~^ ERROR `u32: Foo` is not satisfied
38 //~| ERROR `u32: Foo` is not satisfied
39 //~| ERROR `u32: Foo` is not satisfied
43 let _: i32 = f2(2i32);
44 //~^ ERROR mismatched types
45 //~| expected `i32`, found `u32`