blob: fa74d027f1eaa6a492168b7bd43fdd3879b3b31b [file] [log] [blame]
error[E0369]: binary operation `==` cannot be applied to type `fn() {main::f}`
--> $DIR/fn-compare-mismatch.rs:4:15
|
LL | let x = f == g;
| - ^^ - fn() {main::g}
| |
| fn() {main::f}
|
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();
| ^^^
error[E0308]: mismatched types
--> $DIR/fn-compare-mismatch.rs:4:18
|
LL | let x = f == g;
| ^ expected fn item, found a different fn item
|
= note: expected fn item `fn() {main::f}`
found fn item `fn() {main::g}`
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0308, E0369.
For more information about an error, try `rustc --explain E0308`.