2018-08-08 14:28:26 +02:00
|
|
|
error[E0369]: binary operation `==` cannot be applied to type `fn() {main::f}`
|
2019-03-27 13:13:09 -04:00
|
|
|
--> $DIR/fn-compare-mismatch.rs:4:15
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | let x = f == g;
|
2019-04-12 00:00:27 +09:00
|
|
|
| - ^^ - fn() {main::g}
|
|
|
|
| |
|
2019-03-27 13:13:09 -04:00
|
|
|
| fn() {main::f}
|
2019-04-12 22:59:30 +09:00
|
|
|
help: you might have forgotten to call this function
|
|
|
|
|
|
|
|
|
LL | let x = f() == g;
|
|
|
|
| ^^^
|
|
|
|
help: you might have forgotten to call this function
|
|
|
|
|
|
|
|
|
LL | let x = f == g();
|
|
|
|
| ^^^
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/fn-compare-mismatch.rs:4:18
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | let x = f == g;
|
|
|
|
| ^ expected fn item, found a different fn item
|
|
|
|
|
|
|
|
|
= note: expected type `fn() {main::f}`
|
|
|
|
found type `fn() {main::g}`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2019-04-17 13:26:38 -04:00
|
|
|
Some errors have detailed explanations: E0308, E0369.
|
2018-08-08 14:28:26 +02:00
|
|
|
For more information about an error, try `rustc --explain E0308`.
|