@@ -7,7 +7,7 @@ LL | if x = x {
7
7
help: you might have meant to compare for equality
8
8
|
9
9
LL | if x == x {
10
- | ~~
10
+ | +
11
11
12
12
error[E0308]: mismatched types
13
13
--> $DIR/assignment-in-if.rs:20:8
@@ -18,7 +18,7 @@ LL | if (x = x) {
18
18
help: you might have meant to compare for equality
19
19
|
20
20
LL | if (x == x) {
21
- | ~~
21
+ | +
22
22
23
23
error[E0308]: mismatched types
24
24
--> $DIR/assignment-in-if.rs:25:8
@@ -29,7 +29,7 @@ LL | if y = (Foo { foo: x }) {
29
29
help: you might have meant to compare for equality
30
30
|
31
31
LL | if y == (Foo { foo: x }) {
32
- | ~~
32
+ | +
33
33
34
34
error[E0308]: mismatched types
35
35
--> $DIR/assignment-in-if.rs:30:8
@@ -40,7 +40,7 @@ LL | if 3 = x {
40
40
help: you might have meant to compare for equality
41
41
|
42
42
LL | if 3 == x {
43
- | ~~
43
+ | +
44
44
45
45
error[E0308]: mismatched types
46
46
--> $DIR/assignment-in-if.rs:36:13
@@ -51,7 +51,7 @@ LL | x = 4
51
51
help: you might have meant to compare for equality
52
52
|
53
53
LL | x == 4
54
- | ~~
54
+ | +
55
55
56
56
error[E0308]: mismatched types
57
57
--> $DIR/assignment-in-if.rs:38:13
@@ -62,8 +62,48 @@ LL | x = 5
62
62
help: you might have meant to compare for equality
63
63
|
64
64
LL | x == 5
65
- | ~~
65
+ | +
66
66
67
- error: aborting due to 6 previous errors
67
+ error[E0308]: mismatched types
68
+ --> $DIR/assignment-in-if.rs:44:18
69
+ |
70
+ LL | if x == x && x = x && x == x {
71
+ | ^ expected `bool`, found `usize`
72
+
73
+ error[E0308]: mismatched types
74
+ --> $DIR/assignment-in-if.rs:44:22
75
+ |
76
+ LL | if x == x && x = x && x == x {
77
+ | ^ expected `bool`, found `usize`
78
+
79
+ error[E0308]: mismatched types
80
+ --> $DIR/assignment-in-if.rs:44:8
81
+ |
82
+ LL | if x == x && x = x && x == x {
83
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `()`
84
+ |
85
+ help: you might have meant to compare for equality
86
+ |
87
+ LL | if x == x && x == x && x == x {
88
+ | +
89
+
90
+ error[E0308]: mismatched types
91
+ --> $DIR/assignment-in-if.rs:51:28
92
+ |
93
+ LL | if x == x && x == x && x = x {
94
+ | ^ expected `bool`, found `usize`
95
+
96
+ error[E0308]: mismatched types
97
+ --> $DIR/assignment-in-if.rs:51:8
98
+ |
99
+ LL | if x == x && x == x && x = x {
100
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `()`
101
+ |
102
+ help: you might have meant to compare for equality
103
+ |
104
+ LL | if x == x && x == x && x == x {
105
+ | +
106
+
107
+ error: aborting due to 11 previous errors
68
108
69
109
For more information about this error, try `rustc --explain E0308`.
0 commit comments