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 = note: expected type `bool`
13 error[E0308]: mismatched types
14 --> $DIR/assignment-in-if.rs:20:8
19 | expected bool, found ()
20 | help: try comparing for equality: `x == x`
22 = note: expected type `bool`
25 error[E0308]: mismatched types
26 --> $DIR/assignment-in-if.rs:25:8
28 LL | if y = (Foo { foo: x }) {
29 | ^^^^^^^^^^^^^^^^^^^^
31 | expected bool, found ()
32 | help: try comparing for equality: `y == (Foo { foo: x })`
34 = note: expected type `bool`
37 error[E0308]: mismatched types
38 --> $DIR/assignment-in-if.rs:30:8
43 | expected bool, found ()
44 | help: try comparing for equality: `3 == x`
46 = note: expected type `bool`
49 error[E0308]: mismatched types
50 --> $DIR/assignment-in-if.rs:36:13
55 | expected bool, found ()
56 | help: try comparing for equality: `x == 4`
58 = note: expected type `bool`
61 error[E0308]: mismatched types
62 --> $DIR/assignment-in-if.rs:38:13
67 | expected bool, found ()
68 | help: try comparing for equality: `x == 5`
70 = note: expected type `bool`
73 error: aborting due to 6 previous errors
75 For more information about this error, try `rustc --explain E0308`.