1 error[E0308]: mismatched types
2 --> $DIR/fn-item-type.rs:23:19
4 LL | eq(foo::<u8>, bar::<u8>);
5 | ^^^^^^^^^ expected fn item, found a different fn item
7 = note: expected type `fn(isize) -> isize {foo::<u8>}`
8 found type `fn(isize) -> isize {bar::<u8>}`
10 error[E0308]: mismatched types
11 --> $DIR/fn-item-type.rs:29:19
13 LL | eq(foo::<u8>, foo::<i8>);
14 | ^^^^^^^^^ expected u8, found i8
16 = note: expected type `fn(isize) -> isize {foo::<u8>}`
17 found type `fn(isize) -> isize {foo::<i8>}`
19 error[E0308]: mismatched types
20 --> $DIR/fn-item-type.rs:33:23
22 LL | eq(bar::<String>, bar::<Vec<u8>>);
23 | ^^^^^^^^^^^^^^ expected struct `std::string::String`, found struct `std::vec::Vec`
25 = note: expected type `fn(isize) -> isize {bar::<std::string::String>}`
26 found type `fn(isize) -> isize {bar::<std::vec::Vec<u8>>}`
28 error[E0308]: mismatched types
29 --> $DIR/fn-item-type.rs:40:26
31 LL | eq(<u8 as Foo>::foo, <u16 as Foo>::foo);
32 | ^^^^^^^^^^^^^^^^^ expected u8, found u16
34 = note: expected type `fn() {<u8 as Foo>::foo}`
35 found type `fn() {<u16 as Foo>::foo}`
37 error: aborting due to 4 previous errors
39 For more information about this error, try `rustc --explain E0308`.