error[E0308]: mismatched types --> $DIR/fn-item-type.rs:22:19 | LL | eq(foo::, bar::); | -- ^^^^^^^^^ expected fn item, found a different fn item | | | arguments to this function are incorrect | = note: expected fn item `fn(_) -> _ {foo::}` found fn item `fn(_) -> _ {bar::}` = note: different fn items have unique types, even if their signatures are the same note: function defined here --> $DIR/fn-item-type.rs:11:4 | LL | fn eq(x: T, y: T) {} | ^^ ---- = help: consider casting both fn items to fn pointers using `as fn(isize) -> isize` error[E0308]: mismatched types --> $DIR/fn-item-type.rs:29:19 | LL | eq(foo::, foo::); | -- ^^^^^^^^^ expected `u8`, found `i8` | | | arguments to this function are incorrect | = note: expected fn item `fn(_) -> _ {foo::}` found fn item `fn(_) -> _ {foo::}` = note: different fn items have unique types, even if their signatures are the same note: function defined here --> $DIR/fn-item-type.rs:11:4 | LL | fn eq(x: T, y: T) {} | ^^ ---- = help: consider casting both fn items to fn pointers using `as fn(isize) -> isize` error[E0308]: mismatched types --> $DIR/fn-item-type.rs:34:23 | LL | eq(bar::, bar::>); | -- ^^^^^^^^^^^^^^ expected `String`, found `Vec` | | | arguments to this function are incorrect | = note: expected fn item `fn(_) -> _ {bar::}` found fn item `fn(_) -> _ {bar::>}` = note: different fn items have unique types, even if their signatures are the same note: function defined here --> $DIR/fn-item-type.rs:11:4 | LL | fn eq(x: T, y: T) {} | ^^ ---- = help: consider casting both fn items to fn pointers using `as fn(isize) -> isize` error[E0308]: mismatched types --> $DIR/fn-item-type.rs:40:26 | LL | eq(::foo, ::foo); | -- ^^^^^^^^^^^^^^^^^ expected `u8`, found `u16` | | | arguments to this function are incorrect | = note: expected fn item `fn() {::foo}` found fn item `fn() {::foo}` = note: different fn items have unique types, even if their signatures are the same note: function defined here --> $DIR/fn-item-type.rs:11:4 | LL | fn eq(x: T, y: T) {} | ^^ ---- = help: consider casting both fn items to fn pointers using `as fn()` error[E0308]: mismatched types --> $DIR/fn-item-type.rs:45:19 | LL | eq(foo::, bar:: as fn(isize) -> isize); | -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn item, found fn pointer | | | arguments to this function are incorrect | = note: expected fn item `fn(_) -> _ {foo::}` found fn pointer `fn(_) -> _` = help: consider casting the fn item to a fn pointer: `foo:: as fn(isize) -> isize` note: function defined here --> $DIR/fn-item-type.rs:11:4 | LL | fn eq(x: T, y: T) {} | ^^ ---- error: aborting due to 5 previous errors For more information about this error, try `rustc --explain E0308`.