You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
found fn item `fn(_) -> _ {bar::<std::vec::Vec<u8>>}`
33
+
= note: different `fn` items always have unique types, even if their signatures are the same
34
+
= help: change the expected type to be function pointer `fn(isize) -> isize`
35
+
= help: if the expected type is due to type inference, cast the expected `fn` to a function pointer: `bar::<std::string::String> as fn(isize) -> isize`
27
36
28
37
error[E0308]: mismatched types
29
-
--> $DIR/fn-item-type.rs:30:26
38
+
--> $DIR/fn-item-type.rs:39:26
30
39
|
31
40
LL | eq(<u8 as Foo>::foo, <u16 as Foo>::foo);
32
41
| ^^^^^^^^^^^^^^^^^ expected `u8`, found `u16`
33
42
|
34
43
= note: expected fn item `fn() {<u8 as Foo>::foo}`
35
44
found fn item `fn() {<u16 as Foo>::foo}`
45
+
= note: different `fn` items always have unique types, even if their signatures are the same
46
+
= help: change the expected type to be function pointer `fn()`
47
+
= help: if the expected type is due to type inference, cast the expected `fn` to a function pointer: `<u8 as Foo>::foo as fn()`
36
48
37
-
error: aborting due to 4 previous errors
49
+
error[E0308]: mismatched types
50
+
--> $DIR/fn-item-type.rs:46:19
51
+
|
52
+
LL | eq(foo::<u8>, bar::<u8> as fn(isize) -> isize);
53
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn item, found fn pointer
54
+
|
55
+
= note: expected fn item `fn(_) -> _ {foo::<u8>}`
56
+
found fn pointer `fn(_) -> _`
57
+
= help: change the expected type to be function pointer `fn(isize) -> isize`
58
+
= help: if the expected type is due to type inference, cast the expected `fn` to a function pointer: `foo::<u8> as fn(isize) -> isize`
59
+
60
+
error: aborting due to 5 previous errors
38
61
39
62
For more information about this error, try `rustc --explain E0308`.
0 commit comments