@@ -15,41 +15,65 @@ LL | second == 1
15
15
= note: expected fn item `fn() {second}`
16
16
found type `{integer}`
17
17
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
+
18
26
error[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
20
28
|
21
29
LL | first == 1
22
30
| ----- ^^ - {integer}
23
31
| |
24
32
| fn() {first}
25
33
26
34
error[E0308]: mismatched types
27
- --> $DIR/issue-66667-function-cmp-cycle.rs:7 :14
35
+ --> $DIR/issue-66667-function-cmp-cycle.rs:8 :14
28
36
|
29
37
LL | first == 1
30
38
| ^ expected fn item, found integer
31
39
|
32
40
= note: expected fn item `fn() {first}`
33
41
found type `{integer}`
34
42
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
+
35
51
error[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
37
53
|
38
54
LL | bar == 1
39
55
| --- ^^ - {integer}
40
56
| |
41
57
| fn() {bar}
42
58
43
59
error[E0308]: mismatched types
44
- --> $DIR/issue-66667-function-cmp-cycle.rs:12 :12
60
+ --> $DIR/issue-66667-function-cmp-cycle.rs:14 :12
45
61
|
46
62
LL | bar == 1
47
63
| ^ expected fn item, found integer
48
64
|
49
65
= note: expected fn item `fn() {bar}`
50
66
found type `{integer}`
51
67
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
53
77
54
78
Some errors have detailed explanations: E0308, E0369.
55
79
For more information about an error, try `rustc --explain E0308`.
0 commit comments