fork/rust

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

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

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