]>
Commit | Line | Data |
---|---|---|
1b1a35ee | 1 | error[E0369]: binary operation `==` cannot be applied to type `fn() {f}` |
532ac7d7 | 2 | --> $DIR/fn-compare-mismatch.rs:4:15 |
b7449926 XL |
3 | | |
4 | LL | let x = f == g; | |
1b1a35ee | 5 | | - ^^ - fn() {g} |
532ac7d7 | 6 | | | |
1b1a35ee | 7 | | fn() {f} |
e74abb32 | 8 | | |
48663c56 | 9 | help: you might have forgotten to call this function |
b7449926 | 10 | | |
48663c56 | 11 | LL | let x = f() == g; |
94222f64 | 12 | | ~~~ |
48663c56 XL |
13 | help: you might have forgotten to call this function |
14 | | | |
15 | LL | let x = f == g(); | |
94222f64 | 16 | | ~~~ |
b7449926 XL |
17 | |
18 | error[E0308]: mismatched types | |
0731742a | 19 | --> $DIR/fn-compare-mismatch.rs:4:18 |
b7449926 XL |
20 | | |
21 | LL | let x = f == g; | |
22 | | ^ expected fn item, found a different fn item | |
23 | | | |
1b1a35ee XL |
24 | = note: expected fn item `fn() {f}` |
25 | found fn item `fn() {g}` | |
b7449926 XL |
26 | |
27 | error: aborting due to 2 previous errors | |
28 | ||
48663c56 | 29 | Some errors have detailed explanations: E0308, E0369. |
b7449926 | 30 | For more information about an error, try `rustc --explain E0308`. |