fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
898 B28 linesraw
1error[E0369]: binary operation `==` cannot be applied to type `fn() {f}`
2  --> $DIR/fn-compare-mismatch.rs:4:15
3   |
4LL |     let x = f == g;
5   |             - ^^ - fn() {g}
6   |             |
7   |             fn() {f}
8   |
9help: use parentheses to call these
10   |
11LL |     let x = f() == g();
12   |              ++     ++
13
14error[E0308]: mismatched types
15  --> $DIR/fn-compare-mismatch.rs:4:18
16   |
17LL |     let x = f == g;
18   |                  ^ expected fn item, found a different fn item
19   |
20   = note: expected fn item `fn() {f}`
21              found fn item `fn() {g}`
22   = note: different fn items have unique types, even if their signatures are the same
23   = help: consider casting both fn items to fn pointers using `as fn()`
24
25error: aborting due to 2 previous errors
26
27Some errors have detailed explanations: E0308, E0369.
28For more information about an error, try `rustc --explain E0308`.