]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0308]: mismatched types |
0731742a | 2 | --> $DIR/fn-item-type.rs:13:19 |
b7449926 XL |
3 | | |
4 | LL | eq(foo::<u8>, bar::<u8>); | |
923072b8 FG |
5 | | -- ^^^^^^^^^ expected fn item, found a different fn item |
6 | | | | |
7 | | arguments to this function are incorrect | |
b7449926 | 8 | | |
60c5eb7d XL |
9 | = note: expected fn item `fn(_) -> _ {foo::<u8>}` |
10 | found fn item `fn(_) -> _ {bar::<u8>}` | |
f035d41b XL |
11 | = note: different `fn` items always have unique types, even if their signatures are the same |
12 | = help: change the expected type to be function pointer `fn(isize) -> isize` | |
13 | = help: if the expected type is due to type inference, cast the expected `fn` to a function pointer: `foo::<u8> as fn(isize) -> isize` | |
923072b8 FG |
14 | note: function defined here |
15 | --> $DIR/fn-item-type.rs:7:4 | |
16 | | | |
17 | LL | fn eq<T>(x: T, y: T) { } | |
18 | | ^^ ---- ---- | |
b7449926 XL |
19 | |
20 | error[E0308]: mismatched types | |
f035d41b | 21 | --> $DIR/fn-item-type.rs:22:19 |
b7449926 XL |
22 | | |
23 | LL | eq(foo::<u8>, foo::<i8>); | |
923072b8 FG |
24 | | -- ^^^^^^^^^ expected `u8`, found `i8` |
25 | | | | |
26 | | arguments to this function are incorrect | |
b7449926 | 27 | | |
60c5eb7d XL |
28 | = note: expected fn item `fn(_) -> _ {foo::<u8>}` |
29 | found fn item `fn(_) -> _ {foo::<i8>}` | |
f035d41b XL |
30 | = note: different `fn` items always have unique types, even if their signatures are the same |
31 | = help: change the expected type to be function pointer `fn(isize) -> isize` | |
32 | = help: if the expected type is due to type inference, cast the expected `fn` to a function pointer: `foo::<u8> as fn(isize) -> isize` | |
923072b8 FG |
33 | note: function defined here |
34 | --> $DIR/fn-item-type.rs:7:4 | |
35 | | | |
36 | LL | fn eq<T>(x: T, y: T) { } | |
37 | | ^^ ---- ---- | |
b7449926 XL |
38 | |
39 | error[E0308]: mismatched types | |
f035d41b | 40 | --> $DIR/fn-item-type.rs:29:23 |
b7449926 XL |
41 | | |
42 | LL | eq(bar::<String>, bar::<Vec<u8>>); | |
923072b8 FG |
43 | | -- ^^^^^^^^^^^^^^ expected struct `String`, found struct `Vec` |
44 | | | | |
45 | | arguments to this function are incorrect | |
b7449926 | 46 | | |
1b1a35ee XL |
47 | = note: expected fn item `fn(_) -> _ {bar::<String>}` |
48 | found fn item `fn(_) -> _ {bar::<Vec<u8>>}` | |
f035d41b XL |
49 | = note: different `fn` items always have unique types, even if their signatures are the same |
50 | = help: change the expected type to be function pointer `fn(isize) -> isize` | |
1b1a35ee | 51 | = help: if the expected type is due to type inference, cast the expected `fn` to a function pointer: `bar::<String> as fn(isize) -> isize` |
923072b8 FG |
52 | note: function defined here |
53 | --> $DIR/fn-item-type.rs:7:4 | |
54 | | | |
55 | LL | fn eq<T>(x: T, y: T) { } | |
56 | | ^^ ---- ---- | |
b7449926 XL |
57 | |
58 | error[E0308]: mismatched types | |
04454e1e | 59 | --> $DIR/fn-item-type.rs:38:26 |
b7449926 XL |
60 | | |
61 | LL | eq(<u8 as Foo>::foo, <u16 as Foo>::foo); | |
923072b8 FG |
62 | | -- ^^^^^^^^^^^^^^^^^ expected `u8`, found `u16` |
63 | | | | |
64 | | arguments to this function are incorrect | |
b7449926 | 65 | | |
60c5eb7d XL |
66 | = note: expected fn item `fn() {<u8 as Foo>::foo}` |
67 | found fn item `fn() {<u16 as Foo>::foo}` | |
f035d41b XL |
68 | = note: different `fn` items always have unique types, even if their signatures are the same |
69 | = help: change the expected type to be function pointer `fn()` | |
70 | = help: if the expected type is due to type inference, cast the expected `fn` to a function pointer: `<u8 as Foo>::foo as fn()` | |
923072b8 FG |
71 | note: function defined here |
72 | --> $DIR/fn-item-type.rs:7:4 | |
73 | | | |
74 | LL | fn eq<T>(x: T, y: T) { } | |
75 | | ^^ ---- ---- | |
b7449926 | 76 | |
f035d41b | 77 | error[E0308]: mismatched types |
04454e1e | 78 | --> $DIR/fn-item-type.rs:45:19 |
f035d41b XL |
79 | | |
80 | LL | eq(foo::<u8>, bar::<u8> as fn(isize) -> isize); | |
923072b8 FG |
81 | | -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn item, found fn pointer |
82 | | | | |
83 | | arguments to this function are incorrect | |
f035d41b XL |
84 | | |
85 | = note: expected fn item `fn(_) -> _ {foo::<u8>}` | |
86 | found fn pointer `fn(_) -> _` | |
87 | = help: change the expected type to be function pointer `fn(isize) -> isize` | |
88 | = help: if the expected type is due to type inference, cast the expected `fn` to a function pointer: `foo::<u8> as fn(isize) -> isize` | |
923072b8 FG |
89 | note: function defined here |
90 | --> $DIR/fn-item-type.rs:7:4 | |
91 | | | |
92 | LL | fn eq<T>(x: T, y: T) { } | |
93 | | ^^ ---- ---- | |
f035d41b XL |
94 | |
95 | error: aborting due to 5 previous errors | |
b7449926 XL |
96 | |
97 | For more information about this error, try `rustc --explain E0308`. |