]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type/type-check/assignment-expected-bool.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / type / type-check / assignment-expected-bool.stderr
CommitLineData
532ac7d7
XL
1error[E0308]: mismatched types
2 --> $DIR/assignment-expected-bool.rs:6:19
3 |
4LL | let _: bool = 0 = 0;
5 | ^^^^^
6 | |
60c5eb7d 7 | expected `bool`, found `()`
532ac7d7 8 | help: try comparing for equality: `0 == 0`
532ac7d7
XL
9
10error[E0308]: mismatched types
11 --> $DIR/assignment-expected-bool.rs:9:14
12 |
13LL | 0 => 0 = 0,
14 | ^^^^^
15 | |
60c5eb7d 16 | expected `bool`, found `()`
532ac7d7 17 | help: try comparing for equality: `0 == 0`
532ac7d7
XL
18
19error[E0308]: mismatched types
20 --> $DIR/assignment-expected-bool.rs:10:14
21 |
22LL | _ => 0 = 0,
23 | ^^^^^
24 | |
60c5eb7d 25 | expected `bool`, found `()`
532ac7d7 26 | help: try comparing for equality: `0 == 0`
532ac7d7
XL
27
28error[E0308]: mismatched types
29 --> $DIR/assignment-expected-bool.rs:14:17
30 |
31LL | true => 0 = 0,
32 | ^^^^^
33 | |
60c5eb7d 34 | expected `bool`, found `()`
532ac7d7 35 | help: try comparing for equality: `0 == 0`
532ac7d7
XL
36
37error[E0308]: mismatched types
38 --> $DIR/assignment-expected-bool.rs:18:8
39 |
40LL | if 0 = 0 {}
41 | ^^^^^
42 | |
60c5eb7d 43 | expected `bool`, found `()`
532ac7d7 44 | help: try comparing for equality: `0 == 0`
532ac7d7
XL
45
46error[E0308]: mismatched types
47 --> $DIR/assignment-expected-bool.rs:20:24
48 |
49LL | let _: bool = if { 0 = 0 } {
50 | ^^^^^
51 | |
60c5eb7d 52 | expected `bool`, found `()`
532ac7d7 53 | help: try comparing for equality: `0 == 0`
532ac7d7
XL
54
55error[E0308]: mismatched types
56 --> $DIR/assignment-expected-bool.rs:21:9
57 |
58LL | 0 = 0
59 | ^^^^^
60 | |
60c5eb7d 61 | expected `bool`, found `()`
532ac7d7 62 | help: try comparing for equality: `0 == 0`
532ac7d7
XL
63
64error[E0308]: mismatched types
65 --> $DIR/assignment-expected-bool.rs:23:9
66 |
67LL | 0 = 0
68 | ^^^^^
69 | |
60c5eb7d 70 | expected `bool`, found `()`
532ac7d7 71 | help: try comparing for equality: `0 == 0`
532ac7d7
XL
72
73error[E0308]: mismatched types
74 --> $DIR/assignment-expected-bool.rs:26:13
75 |
76LL | let _ = (0 = 0)
77 | ^^^^^^^
78 | |
60c5eb7d 79 | expected `bool`, found `()`
532ac7d7 80 | help: try comparing for equality: `0 == 0`
532ac7d7
XL
81
82error[E0308]: mismatched types
83 --> $DIR/assignment-expected-bool.rs:27:14
84 |
85LL | && { 0 = 0 }
86 | ^^^^^
87 | |
60c5eb7d 88 | expected `bool`, found `()`
532ac7d7 89 | help: try comparing for equality: `0 == 0`
532ac7d7
XL
90
91error[E0308]: mismatched types
92 --> $DIR/assignment-expected-bool.rs:28:12
93 |
94LL | || (0 = 0);
95 | ^^^^^^^
96 | |
60c5eb7d 97 | expected `bool`, found `()`
532ac7d7 98 | help: try comparing for equality: `0 == 0`
532ac7d7
XL
99
100error[E0070]: invalid left-hand side expression
101 --> $DIR/assignment-expected-bool.rs:31:20
102 |
103LL | let _: usize = 0 = 0;
104 | ^^^^^ left-hand of expression not valid
105
106error[E0308]: mismatched types
107 --> $DIR/assignment-expected-bool.rs:31:20
108 |
109LL | let _: usize = 0 = 0;
60c5eb7d
XL
110 | ----- ^^^^^ expected `usize`, found `()`
111 | |
112 | expected due to this
532ac7d7
XL
113
114error: aborting due to 13 previous errors
115
48663c56 116Some errors have detailed explanations: E0070, E0308.
532ac7d7 117For more information about an error, try `rustc --explain E0070`.