1 error[E0308]: mismatched types
2 --> $DIR/assignment-in-if.rs:15:8
7 | expected `bool`, found `()`
8 | help: try comparing for equality: `x == x`
10 error[E0308]: mismatched types
11 --> $DIR/assignment-in-if.rs:20:8
16 | expected `bool`, found `()`
17 | help: try comparing for equality: `x == x`
19 error[E0308]: mismatched types
20 --> $DIR/assignment-in-if.rs:25:8
22 LL | if y = (Foo { foo: x }) {
23 | ^^^^^^^^^^^^^^^^^^^^
25 | expected `bool`, found `()`
26 | help: try comparing for equality: `y == (Foo { foo: x })`
28 error[E0308]: mismatched types
29 --> $DIR/assignment-in-if.rs:30:8
34 | expected `bool`, found `()`
35 | help: try comparing for equality: `3 == x`
37 error[E0308]: mismatched types
38 --> $DIR/assignment-in-if.rs:36:13
43 | expected `bool`, found `()`
44 | help: try comparing for equality: `x == 4`
46 error[E0308]: mismatched types
47 --> $DIR/assignment-in-if.rs:38:13
52 | expected `bool`, found `()`
53 | help: try comparing for equality: `x == 5`
55 error: aborting due to 6 previous errors
57 For more information about this error, try `rustc --explain E0308`.