]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type/type-check/assignment-in-if.stderr
Remove E0308 note when primary label has all info
[rust.git] / src / test / ui / type / type-check / assignment-in-if.stderr
1 error[E0308]: mismatched types
2   --> $DIR/assignment-in-if.rs:15:8
3    |
4 LL |     if x = x {
5    |        ^^^^^
6    |        |
7    |        expected bool, found ()
8    |        help: try comparing for equality: `x == x`
9
10 error[E0308]: mismatched types
11   --> $DIR/assignment-in-if.rs:20:8
12    |
13 LL |     if (x = x) {
14    |        ^^^^^^^
15    |        |
16    |        expected bool, found ()
17    |        help: try comparing for equality: `x == x`
18
19 error[E0308]: mismatched types
20   --> $DIR/assignment-in-if.rs:25:8
21    |
22 LL |     if y = (Foo { foo: x }) {
23    |        ^^^^^^^^^^^^^^^^^^^^
24    |        |
25    |        expected bool, found ()
26    |        help: try comparing for equality: `y == (Foo { foo: x })`
27
28 error[E0308]: mismatched types
29   --> $DIR/assignment-in-if.rs:30:8
30    |
31 LL |     if 3 = x {
32    |        ^^^^^
33    |        |
34    |        expected bool, found ()
35    |        help: try comparing for equality: `3 == x`
36
37 error[E0308]: mismatched types
38   --> $DIR/assignment-in-if.rs:36:13
39    |
40 LL |             x = 4
41    |             ^^^^^
42    |             |
43    |             expected bool, found ()
44    |             help: try comparing for equality: `x == 4`
45
46 error[E0308]: mismatched types
47   --> $DIR/assignment-in-if.rs:38:13
48    |
49 LL |             x = 5
50    |             ^^^^^
51    |             |
52    |             expected bool, found ()
53    |             help: try comparing for equality: `x == 5`
54
55 error: aborting due to 6 previous errors
56
57 For more information about this error, try `rustc --explain E0308`.