fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
5.7 KiB196 linesraw
1error[E0308]: mismatched types
2  --> $DIR/const-integer-bool-ops.rs:1:18
3   |
4LL | const X: usize = 42 && 39;
5   |                  ^^ expected bool, found integer
6   |
7   = note: expected type `bool`
8              found type `{integer}`
9
10error[E0308]: mismatched types
11  --> $DIR/const-integer-bool-ops.rs:1:24
12   |
13LL | const X: usize = 42 && 39;
14   |                        ^^ expected bool, found integer
15   |
16   = note: expected type `bool`
17              found type `{integer}`
18
19error[E0308]: mismatched types
20  --> $DIR/const-integer-bool-ops.rs:1:18
21   |
22LL | const X: usize = 42 && 39;
23   |                  ^^^^^^^^ expected usize, found bool
24
25error[E0080]: evaluation of constant value failed
26  --> $DIR/const-integer-bool-ops.rs:8:18
27   |
28LL | const ARR: [i32; X] = [99; 34];
29   |                  ^ referenced constant has errors
30
31error[E0308]: mismatched types
32  --> $DIR/const-integer-bool-ops.rs:11:19
33   |
34LL | const X1: usize = 42 || 39;
35   |                   ^^ expected bool, found integer
36   |
37   = note: expected type `bool`
38              found type `{integer}`
39
40error[E0308]: mismatched types
41  --> $DIR/const-integer-bool-ops.rs:11:25
42   |
43LL | const X1: usize = 42 || 39;
44   |                         ^^ expected bool, found integer
45   |
46   = note: expected type `bool`
47              found type `{integer}`
48
49error[E0308]: mismatched types
50  --> $DIR/const-integer-bool-ops.rs:11:19
51   |
52LL | const X1: usize = 42 || 39;
53   |                   ^^^^^^^^ expected usize, found bool
54
55error[E0080]: evaluation of constant value failed
56  --> $DIR/const-integer-bool-ops.rs:18:19
57   |
58LL | const ARR1: [i32; X1] = [99; 47];
59   |                   ^^ referenced constant has errors
60
61error[E0308]: mismatched types
62  --> $DIR/const-integer-bool-ops.rs:21:19
63   |
64LL | const X2: usize = -42 || -39;
65   |                   ^^^ expected bool, found integer
66   |
67   = note: expected type `bool`
68              found type `{integer}`
69
70error[E0308]: mismatched types
71  --> $DIR/const-integer-bool-ops.rs:21:26
72   |
73LL | const X2: usize = -42 || -39;
74   |                          ^^^ expected bool, found integer
75   |
76   = note: expected type `bool`
77              found type `{integer}`
78
79error[E0308]: mismatched types
80  --> $DIR/const-integer-bool-ops.rs:21:19
81   |
82LL | const X2: usize = -42 || -39;
83   |                   ^^^^^^^^^^ expected usize, found bool
84
85error[E0080]: evaluation of constant value failed
86  --> $DIR/const-integer-bool-ops.rs:28:19
87   |
88LL | const ARR2: [i32; X2] = [99; 18446744073709551607];
89   |                   ^^ referenced constant has errors
90
91error[E0308]: mismatched types
92  --> $DIR/const-integer-bool-ops.rs:31:19
93   |
94LL | const X3: usize = -42 && -39;
95   |                   ^^^ expected bool, found integer
96   |
97   = note: expected type `bool`
98              found type `{integer}`
99
100error[E0308]: mismatched types
101  --> $DIR/const-integer-bool-ops.rs:31:26
102   |
103LL | const X3: usize = -42 && -39;
104   |                          ^^^ expected bool, found integer
105   |
106   = note: expected type `bool`
107              found type `{integer}`
108
109error[E0308]: mismatched types
110  --> $DIR/const-integer-bool-ops.rs:31:19
111   |
112LL | const X3: usize = -42 && -39;
113   |                   ^^^^^^^^^^ expected usize, found bool
114
115error[E0080]: evaluation of constant value failed
116  --> $DIR/const-integer-bool-ops.rs:38:19
117   |
118LL | const ARR3: [i32; X3] = [99; 6];
119   |                   ^^ referenced constant has errors
120
121error[E0308]: mismatched types
122  --> $DIR/const-integer-bool-ops.rs:41:18
123   |
124LL | const Y: usize = 42.0 == 42.0;
125   |                  ^^^^^^^^^^^^ expected usize, found bool
126
127error[E0080]: evaluation of constant value failed
128  --> $DIR/const-integer-bool-ops.rs:44:19
129   |
130LL | const ARRR: [i32; Y] = [99; 1];
131   |                   ^ referenced constant has errors
132
133error[E0308]: mismatched types
134  --> $DIR/const-integer-bool-ops.rs:47:19
135   |
136LL | const Y1: usize = 42.0 >= 42.0;
137   |                   ^^^^^^^^^^^^ expected usize, found bool
138
139error[E0080]: evaluation of constant value failed
140  --> $DIR/const-integer-bool-ops.rs:50:20
141   |
142LL | const ARRR1: [i32; Y1] = [99; 1];
143   |                    ^^ referenced constant has errors
144
145error[E0308]: mismatched types
146  --> $DIR/const-integer-bool-ops.rs:53:19
147   |
148LL | const Y2: usize = 42.0 <= 42.0;
149   |                   ^^^^^^^^^^^^ expected usize, found bool
150
151error[E0080]: evaluation of constant value failed
152  --> $DIR/const-integer-bool-ops.rs:56:20
153   |
154LL | const ARRR2: [i32; Y2] = [99; 1];
155   |                    ^^ referenced constant has errors
156
157error[E0308]: mismatched types
158  --> $DIR/const-integer-bool-ops.rs:59:19
159   |
160LL | const Y3: usize = 42.0 > 42.0;
161   |                   ^^^^^^^^^^^ expected usize, found bool
162
163error[E0080]: evaluation of constant value failed
164  --> $DIR/const-integer-bool-ops.rs:62:20
165   |
166LL | const ARRR3: [i32; Y3] = [99; 0];
167   |                    ^^ referenced constant has errors
168
169error[E0308]: mismatched types
170  --> $DIR/const-integer-bool-ops.rs:65:19
171   |
172LL | const Y4: usize = 42.0 < 42.0;
173   |                   ^^^^^^^^^^^ expected usize, found bool
174
175error[E0080]: evaluation of constant value failed
176  --> $DIR/const-integer-bool-ops.rs:68:20
177   |
178LL | const ARRR4: [i32; Y4] = [99; 0];
179   |                    ^^ referenced constant has errors
180
181error[E0308]: mismatched types
182  --> $DIR/const-integer-bool-ops.rs:71:19
183   |
184LL | const Y5: usize = 42.0 != 42.0;
185   |                   ^^^^^^^^^^^^ expected usize, found bool
186
187error[E0080]: evaluation of constant value failed
188  --> $DIR/const-integer-bool-ops.rs:74:20
189   |
190LL | const ARRR5: [i32; Y5] = [99; 0];
191   |                    ^^ referenced constant has errors
192
193error: aborting due to 28 previous errors
194
195Some errors have detailed explanations: E0080, E0308.
196For more information about an error, try `rustc --explain E0080`.