1 error[E0308]: mismatched types
2 --> $DIR/assignment-in-if.rs:15:8
5 | ^^^^^ expected `bool`, found `()`
7 help: you might have meant to compare for equality
12 error[E0308]: mismatched types
13 --> $DIR/assignment-in-if.rs:20:8
16 | ^^^^^^^ expected `bool`, found `()`
18 help: you might have meant to compare for equality
23 error[E0308]: mismatched types
24 --> $DIR/assignment-in-if.rs:25:8
26 LL | if y = (Foo { foo: x }) {
27 | ^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `()`
29 help: you might have meant to compare for equality
31 LL | if y == (Foo { foo: x }) {
34 error[E0308]: mismatched types
35 --> $DIR/assignment-in-if.rs:30:8
38 | ^^^^^ expected `bool`, found `()`
40 help: you might have meant to compare for equality
45 error[E0308]: mismatched types
46 --> $DIR/assignment-in-if.rs:36:13
49 | ^^^^^ expected `bool`, found `()`
51 help: you might have meant to compare for equality
56 error[E0308]: mismatched types
57 --> $DIR/assignment-in-if.rs:38:13
60 | ^^^^^ expected `bool`, found `()`
62 help: you might have meant to compare for equality
67 error[E0308]: mismatched types
68 --> $DIR/assignment-in-if.rs:44:18
70 LL | if x == x && x = x && x == x {
71 | ------ ^ expected `bool`, found `usize`
73 | expected because this is `bool`
75 error[E0308]: mismatched types
76 --> $DIR/assignment-in-if.rs:44:22
78 LL | if x == x && x = x && x == x {
79 | ^ expected `bool`, found `usize`
81 error[E0308]: mismatched types
82 --> $DIR/assignment-in-if.rs:44:8
84 LL | if x == x && x = x && x == x {
85 | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `()`
87 help: you might have meant to compare for equality
89 LL | if x == x && x == x && x == x {
92 error[E0308]: mismatched types
93 --> $DIR/assignment-in-if.rs:51:28
95 LL | if x == x && x == x && x = x {
96 | ---------------- ^ expected `bool`, found `usize`
98 | expected because this is `bool`
100 error[E0308]: mismatched types
101 --> $DIR/assignment-in-if.rs:51:8
103 LL | if x == x && x == x && x = x {
104 | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `()`
106 help: you might have meant to compare for equality
108 LL | if x == x && x == x && x == x {
111 error[E0308]: mismatched types
112 --> $DIR/assignment-in-if.rs:57:12
114 LL | if x = 1 && x == 1 {
115 | ^ expected `bool`, found integer
117 error[E0308]: mismatched types
118 --> $DIR/assignment-in-if.rs:57:8
120 LL | if x = 1 && x == 1 {
121 | ^^^^^^^^^^^^^^^ expected `bool`, found `()`
123 help: you might have meant to compare for equality
125 LL | if x == 1 && x == 1 {
128 error: aborting due to 13 previous errors
130 For more information about this error, try `rustc --explain E0308`.