@@ -15,41 +15,65 @@ LL | second == 1
1515 = note: expected fn item `fn() {second}`
1616 found type `{integer}`
1717
18+ error[E0308]: mismatched types
19+ --> $DIR/issue-66667-function-cmp-cycle.rs:2:5
20+ |
21+ LL | fn first() {
22+ | - help: try adding a return type: `-> bool`
23+ LL | second == 1
24+ | ^^^^^^^^^^^ expected `()`, found `bool`
25+
1826error[E0369]: binary operation `==` cannot be applied to type `fn() {first}`
19- --> $DIR/issue-66667-function-cmp-cycle.rs:7 :11
27+ --> $DIR/issue-66667-function-cmp-cycle.rs:8 :11
2028 |
2129LL | first == 1
2230 | ----- ^^ - {integer}
2331 | |
2432 | fn() {first}
2533
2634error[E0308]: mismatched types
27- --> $DIR/issue-66667-function-cmp-cycle.rs:7 :14
35+ --> $DIR/issue-66667-function-cmp-cycle.rs:8 :14
2836 |
2937LL | first == 1
3038 | ^ expected fn item, found integer
3139 |
3240 = note: expected fn item `fn() {first}`
3341 found type `{integer}`
3442
43+ error[E0308]: mismatched types
44+ --> $DIR/issue-66667-function-cmp-cycle.rs:8:5
45+ |
46+ LL | fn second() {
47+ | - help: try adding a return type: `-> bool`
48+ LL | first == 1
49+ | ^^^^^^^^^^ expected `()`, found `bool`
50+
3551error[E0369]: binary operation `==` cannot be applied to type `fn() {bar}`
36- --> $DIR/issue-66667-function-cmp-cycle.rs:12 :9
52+ --> $DIR/issue-66667-function-cmp-cycle.rs:14 :9
3753 |
3854LL | bar == 1
3955 | --- ^^ - {integer}
4056 | |
4157 | fn() {bar}
4258
4359error[E0308]: mismatched types
44- --> $DIR/issue-66667-function-cmp-cycle.rs:12 :12
60+ --> $DIR/issue-66667-function-cmp-cycle.rs:14 :12
4561 |
4662LL | bar == 1
4763 | ^ expected fn item, found integer
4864 |
4965 = note: expected fn item `fn() {bar}`
5066 found type `{integer}`
5167
52- error: aborting due to 6 previous errors
68+ error[E0308]: mismatched types
69+ --> $DIR/issue-66667-function-cmp-cycle.rs:14:5
70+ |
71+ LL | fn bar() {
72+ | - help: try adding a return type: `-> bool`
73+ LL | bar == 1
74+ | ^^^^^^^^ expected `()`, found `bool`
75+
76+ error: aborting due to 9 previous errors
5377
5478Some errors have detailed explanations: E0308, E0369.
5579For more information about an error, try `rustc --explain E0308`.
0 commit comments