]> git.lizzy.rs Git - rust.git/blob - src/test/ui/fn/fn-compare-mismatch.stderr
Merge commit 'b7f3f7f6082679da2da9a0b3faf1b5adef3afd3b' into clippyup
[rust.git] / src / test / ui / fn / fn-compare-mismatch.stderr
1 error[E0369]: binary operation `==` cannot be applied to type `fn() {f}`
2   --> $DIR/fn-compare-mismatch.rs:4:15
3    |
4 LL |     let x = f == g;
5    |             - ^^ - fn() {g}
6    |             |
7    |             fn() {f}
8    |
9 help: you might have forgotten to call this function
10    |
11 LL |     let x = f() == g;
12    |             ~~~
13 help: you might have forgotten to call this function
14    |
15 LL |     let x = f == g();
16    |                  ~~~
17
18 error[E0308]: mismatched types
19   --> $DIR/fn-compare-mismatch.rs:4:18
20    |
21 LL |     let x = f == g;
22    |                  ^ expected fn item, found a different fn item
23    |
24    = note: expected fn item `fn() {f}`
25               found fn item `fn() {g}`
26
27 error: aborting due to 2 previous errors
28
29 Some errors have detailed explanations: E0308, E0369.
30 For more information about an error, try `rustc --explain E0308`.