]>
Commit | Line | Data |
---|---|---|
dc9dc135 | 1 | error: expected one of `,` or `>`, found `&&` |
60c5eb7d | 2 | --> $DIR/disallowed-positions.rs:239:14 |
dc9dc135 XL |
3 | | |
4 | LL | true && let 1 = 1 | |
60c5eb7d | 5 | | ^^ expected one of `,` or `>` |
dc9dc135 | 6 | |
dc9dc135 XL |
7 | error: `let` expressions are not supported here |
8 | --> $DIR/disallowed-positions.rs:32:9 | |
9 | | | |
10 | LL | if &let 0 = 0 {} | |
11 | | ^^^^^^^^^ | |
12 | | | |
13 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
14 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
15 | ||
16 | error: `let` expressions are not supported here | |
17 | --> $DIR/disallowed-positions.rs:35:9 | |
18 | | | |
19 | LL | if !let 0 = 0 {} | |
20 | | ^^^^^^^^^ | |
21 | | | |
22 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
23 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
24 | ||
25 | error: `let` expressions are not supported here | |
26 | --> $DIR/disallowed-positions.rs:36:9 | |
27 | | | |
28 | LL | if *let 0 = 0 {} | |
29 | | ^^^^^^^^^ | |
30 | | | |
31 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
32 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
33 | ||
34 | error: `let` expressions are not supported here | |
35 | --> $DIR/disallowed-positions.rs:38:9 | |
36 | | | |
37 | LL | if -let 0 = 0 {} | |
38 | | ^^^^^^^^^ | |
39 | | | |
40 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
41 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
42 | ||
43 | error: `let` expressions are not supported here | |
44 | --> $DIR/disallowed-positions.rs:46:9 | |
45 | | | |
46 | LL | if (let 0 = 0)? {} | |
47 | | ^^^^^^^^^ | |
48 | | | |
49 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
50 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
51 | ||
52 | error: `let` expressions are not supported here | |
53 | --> $DIR/disallowed-positions.rs:50:16 | |
54 | | | |
55 | LL | if true || let 0 = 0 {} | |
56 | | ^^^^^^^^^ | |
57 | | | |
58 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
59 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
60 | ||
61 | error: `let` expressions are not supported here | |
62 | --> $DIR/disallowed-positions.rs:51:17 | |
63 | | | |
64 | LL | if (true || let 0 = 0) {} | |
65 | | ^^^^^^^^^ | |
66 | | | |
67 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
68 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
69 | ||
70 | error: `let` expressions are not supported here | |
71 | --> $DIR/disallowed-positions.rs:52:25 | |
72 | | | |
73 | LL | if true && (true || let 0 = 0) {} | |
74 | | ^^^^^^^^^ | |
75 | | | |
76 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
77 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
78 | ||
79 | error: `let` expressions are not supported here | |
80 | --> $DIR/disallowed-positions.rs:53:25 | |
81 | | | |
82 | LL | if true || (true && let 0 = 0) {} | |
83 | | ^^^^^^^^^ | |
84 | | | |
85 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
86 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
87 | ||
88 | error: `let` expressions are not supported here | |
89 | --> $DIR/disallowed-positions.rs:56:12 | |
90 | | | |
91 | LL | if x = let 0 = 0 {} | |
92 | | ^^^^^^^^^ | |
93 | | | |
94 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
95 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
96 | ||
97 | error: `let` expressions are not supported here | |
98 | --> $DIR/disallowed-positions.rs:59:15 | |
99 | | | |
100 | LL | if true..(let 0 = 0) {} | |
101 | | ^^^^^^^^^ | |
102 | | | |
103 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
104 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
105 | ||
106 | error: `let` expressions are not supported here | |
107 | --> $DIR/disallowed-positions.rs:61:11 | |
108 | | | |
109 | LL | if ..(let 0 = 0) {} | |
110 | | ^^^^^^^^^ | |
111 | | | |
112 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
113 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
114 | ||
115 | error: `let` expressions are not supported here | |
116 | --> $DIR/disallowed-positions.rs:63:9 | |
117 | | | |
118 | LL | if (let 0 = 0).. {} | |
119 | | ^^^^^^^^^ | |
120 | | | |
121 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
122 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
123 | ||
124 | error: `let` expressions are not supported here | |
125 | --> $DIR/disallowed-positions.rs:67:8 | |
126 | | | |
127 | LL | if let Range { start: _, end: _ } = true..true && false {} | |
128 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
129 | | | |
130 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
131 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
132 | ||
133 | error: `let` expressions are not supported here | |
134 | --> $DIR/disallowed-positions.rs:71:8 | |
135 | | | |
136 | LL | if let Range { start: _, end: _ } = true..true || false {} | |
137 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
138 | | | |
139 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
140 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
141 | ||
142 | error: `let` expressions are not supported here | |
143 | --> $DIR/disallowed-positions.rs:78:8 | |
144 | | | |
145 | LL | if let Range { start: F, end } = F..|| true {} | |
146 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
147 | | | |
148 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
149 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
150 | ||
151 | error: `let` expressions are not supported here | |
152 | --> $DIR/disallowed-positions.rs:86:8 | |
153 | | | |
154 | LL | if let Range { start: true, end } = t..&&false {} | |
155 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
156 | | | |
157 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
158 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
159 | ||
160 | error: `let` expressions are not supported here | |
161 | --> $DIR/disallowed-positions.rs:92:19 | |
162 | | | |
163 | LL | if let true = let true = true {} | |
164 | | ^^^^^^^^^^^^^^^ | |
165 | | | |
166 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
167 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
168 | ||
169 | error: `let` expressions are not supported here | |
170 | --> $DIR/disallowed-positions.rs:96:12 | |
171 | | | |
172 | LL | while &let 0 = 0 {} | |
173 | | ^^^^^^^^^ | |
174 | | | |
175 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
176 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
177 | ||
178 | error: `let` expressions are not supported here | |
179 | --> $DIR/disallowed-positions.rs:99:12 | |
180 | | | |
181 | LL | while !let 0 = 0 {} | |
182 | | ^^^^^^^^^ | |
183 | | | |
184 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
185 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
186 | ||
187 | error: `let` expressions are not supported here | |
188 | --> $DIR/disallowed-positions.rs:100:12 | |
189 | | | |
190 | LL | while *let 0 = 0 {} | |
191 | | ^^^^^^^^^ | |
192 | | | |
193 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
194 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
195 | ||
196 | error: `let` expressions are not supported here | |
197 | --> $DIR/disallowed-positions.rs:102:12 | |
198 | | | |
199 | LL | while -let 0 = 0 {} | |
200 | | ^^^^^^^^^ | |
201 | | | |
202 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
203 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
204 | ||
205 | error: `let` expressions are not supported here | |
206 | --> $DIR/disallowed-positions.rs:110:12 | |
207 | | | |
208 | LL | while (let 0 = 0)? {} | |
209 | | ^^^^^^^^^ | |
210 | | | |
211 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
212 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
213 | ||
214 | error: `let` expressions are not supported here | |
215 | --> $DIR/disallowed-positions.rs:114:19 | |
216 | | | |
217 | LL | while true || let 0 = 0 {} | |
218 | | ^^^^^^^^^ | |
219 | | | |
220 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
221 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
222 | ||
223 | error: `let` expressions are not supported here | |
224 | --> $DIR/disallowed-positions.rs:115:20 | |
225 | | | |
226 | LL | while (true || let 0 = 0) {} | |
227 | | ^^^^^^^^^ | |
228 | | | |
229 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
230 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
231 | ||
232 | error: `let` expressions are not supported here | |
233 | --> $DIR/disallowed-positions.rs:116:28 | |
234 | | | |
235 | LL | while true && (true || let 0 = 0) {} | |
236 | | ^^^^^^^^^ | |
237 | | | |
238 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
239 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
240 | ||
241 | error: `let` expressions are not supported here | |
242 | --> $DIR/disallowed-positions.rs:117:28 | |
243 | | | |
244 | LL | while true || (true && let 0 = 0) {} | |
245 | | ^^^^^^^^^ | |
246 | | | |
247 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
248 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
249 | ||
250 | error: `let` expressions are not supported here | |
251 | --> $DIR/disallowed-positions.rs:120:15 | |
252 | | | |
253 | LL | while x = let 0 = 0 {} | |
254 | | ^^^^^^^^^ | |
255 | | | |
256 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
257 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
258 | ||
259 | error: `let` expressions are not supported here | |
260 | --> $DIR/disallowed-positions.rs:123:18 | |
261 | | | |
262 | LL | while true..(let 0 = 0) {} | |
263 | | ^^^^^^^^^ | |
264 | | | |
265 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
266 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
267 | ||
268 | error: `let` expressions are not supported here | |
269 | --> $DIR/disallowed-positions.rs:125:14 | |
270 | | | |
271 | LL | while ..(let 0 = 0) {} | |
272 | | ^^^^^^^^^ | |
273 | | | |
274 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
275 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
276 | ||
277 | error: `let` expressions are not supported here | |
278 | --> $DIR/disallowed-positions.rs:127:12 | |
279 | | | |
280 | LL | while (let 0 = 0).. {} | |
281 | | ^^^^^^^^^ | |
282 | | | |
283 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
284 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
285 | ||
286 | error: `let` expressions are not supported here | |
287 | --> $DIR/disallowed-positions.rs:131:11 | |
288 | | | |
289 | LL | while let Range { start: _, end: _ } = true..true && false {} | |
290 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
291 | | | |
292 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
293 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
294 | ||
295 | error: `let` expressions are not supported here | |
296 | --> $DIR/disallowed-positions.rs:135:11 | |
297 | | | |
298 | LL | while let Range { start: _, end: _ } = true..true || false {} | |
299 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
300 | | | |
301 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
302 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
303 | ||
304 | error: `let` expressions are not supported here | |
305 | --> $DIR/disallowed-positions.rs:142:11 | |
306 | | | |
307 | LL | while let Range { start: F, end } = F..|| true {} | |
308 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
309 | | | |
310 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
311 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
312 | ||
313 | error: `let` expressions are not supported here | |
314 | --> $DIR/disallowed-positions.rs:150:11 | |
315 | | | |
316 | LL | while let Range { start: true, end } = t..&&false {} | |
317 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
318 | | | |
319 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
320 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
321 | ||
322 | error: `let` expressions are not supported here | |
323 | --> $DIR/disallowed-positions.rs:156:22 | |
324 | | | |
325 | LL | while let true = let true = true {} | |
326 | | ^^^^^^^^^^^^^^^ | |
327 | | | |
328 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
329 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
330 | ||
331 | error: `let` expressions are not supported here | |
332 | --> $DIR/disallowed-positions.rs:170:6 | |
333 | | | |
334 | LL | &let 0 = 0; | |
335 | | ^^^^^^^^^ | |
336 | | | |
337 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
338 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
339 | ||
340 | error: `let` expressions are not supported here | |
341 | --> $DIR/disallowed-positions.rs:172:6 | |
342 | | | |
343 | LL | !let 0 = 0; | |
344 | | ^^^^^^^^^ | |
345 | | | |
346 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
347 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
348 | ||
349 | error: `let` expressions are not supported here | |
350 | --> $DIR/disallowed-positions.rs:173:6 | |
351 | | | |
352 | LL | *let 0 = 0; | |
353 | | ^^^^^^^^^ | |
354 | | | |
355 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
356 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
357 | ||
358 | error: `let` expressions are not supported here | |
359 | --> $DIR/disallowed-positions.rs:175:6 | |
360 | | | |
361 | LL | -let 0 = 0; | |
362 | | ^^^^^^^^^ | |
363 | | | |
364 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
365 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
366 | ||
367 | error: `let` expressions are not supported here | |
368 | --> $DIR/disallowed-positions.rs:183:6 | |
369 | | | |
370 | LL | (let 0 = 0)?; | |
371 | | ^^^^^^^^^ | |
372 | | | |
373 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
374 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
375 | ||
376 | error: `let` expressions are not supported here | |
377 | --> $DIR/disallowed-positions.rs:187:13 | |
378 | | | |
379 | LL | true || let 0 = 0; | |
380 | | ^^^^^^^^^ | |
381 | | | |
382 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
383 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
384 | ||
385 | error: `let` expressions are not supported here | |
386 | --> $DIR/disallowed-positions.rs:188:14 | |
387 | | | |
388 | LL | (true || let 0 = 0); | |
389 | | ^^^^^^^^^ | |
390 | | | |
391 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
392 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
393 | ||
394 | error: `let` expressions are not supported here | |
395 | --> $DIR/disallowed-positions.rs:189:22 | |
396 | | | |
397 | LL | true && (true || let 0 = 0); | |
398 | | ^^^^^^^^^ | |
399 | | | |
400 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
401 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
402 | ||
403 | error: `let` expressions are not supported here | |
404 | --> $DIR/disallowed-positions.rs:192:9 | |
405 | | | |
406 | LL | x = let 0 = 0; | |
407 | | ^^^^^^^^^ | |
408 | | | |
409 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
410 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
411 | ||
412 | error: `let` expressions are not supported here | |
413 | --> $DIR/disallowed-positions.rs:194:12 | |
414 | | | |
415 | LL | true..(let 0 = 0); | |
416 | | ^^^^^^^^^ | |
417 | | | |
418 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
419 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
420 | ||
421 | error: `let` expressions are not supported here | |
422 | --> $DIR/disallowed-positions.rs:195:8 | |
423 | | | |
424 | LL | ..(let 0 = 0); | |
425 | | ^^^^^^^^^ | |
426 | | | |
427 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
428 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
429 | ||
430 | error: `let` expressions are not supported here | |
431 | --> $DIR/disallowed-positions.rs:196:6 | |
432 | | | |
433 | LL | (let 0 = 0)..; | |
434 | | ^^^^^^^^^ | |
435 | | | |
436 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
437 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
438 | ||
439 | error: `let` expressions are not supported here | |
440 | --> $DIR/disallowed-positions.rs:198:6 | |
441 | | | |
442 | LL | (let Range { start: _, end: _ } = true..true || false); | |
443 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
444 | | | |
445 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
446 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
447 | ||
448 | error: `let` expressions are not supported here | |
449 | --> $DIR/disallowed-positions.rs:202:6 | |
450 | | | |
451 | LL | (let true = let true = true); | |
452 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
453 | | | |
454 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
455 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
456 | ||
457 | error: `let` expressions are not supported here | |
458 | --> $DIR/disallowed-positions.rs:202:17 | |
459 | | | |
460 | LL | (let true = let true = true); | |
461 | | ^^^^^^^^^^^^^^^ | |
462 | | | |
463 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
464 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
465 | ||
466 | error: `let` expressions are not supported here | |
467 | --> $DIR/disallowed-positions.rs:207:6 | |
468 | | | |
469 | LL | &let 0 = 0 | |
470 | | ^^^^^^^^^ | |
471 | | | |
472 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
473 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
474 | ||
475 | error: `let` expressions are not supported here | |
476 | --> $DIR/disallowed-positions.rs:218:17 | |
477 | | | |
478 | LL | true && let 1 = 1 | |
479 | | ^^^^^^^^^ | |
480 | | | |
481 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
482 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
483 | ||
484 | error: `let` expressions are not supported here | |
60c5eb7d | 485 | --> $DIR/disallowed-positions.rs:223:17 |
dc9dc135 XL |
486 | | |
487 | LL | true && let 1 = 1 | |
488 | | ^^^^^^^^^ | |
489 | | | |
490 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
491 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
492 | ||
493 | error: `let` expressions are not supported here | |
60c5eb7d | 494 | --> $DIR/disallowed-positions.rs:228:17 |
dc9dc135 XL |
495 | | |
496 | LL | true && let 1 = 1 | |
497 | | ^^^^^^^^^ | |
498 | | | |
499 | = note: only supported directly in conditions of `if`- and `while`-expressions | |
500 | = note: as well as when nested within `&&` and parenthesis in those conditions | |
501 | ||
416331ca XL |
502 | warning: the feature `const_generics` is incomplete and may cause the compiler to crash |
503 | --> $DIR/disallowed-positions.rs:20:12 | |
504 | | | |
505 | LL | #![feature(const_generics)] | |
506 | | ^^^^^^^^^^^^^^ | |
507 | | | |
508 | = note: `#[warn(incomplete_features)]` on by default | |
509 | ||
510 | warning: the feature `let_chains` is incomplete and may cause the compiler to crash | |
511 | --> $DIR/disallowed-positions.rs:22:12 | |
512 | | | |
513 | LL | #![feature(let_chains)] // Avoid inflating `.stderr` with overzealous gates in this test. | |
514 | | ^^^^^^^^^^ | |
515 | ||
60c5eb7d XL |
516 | error[E0658]: `match` is not allowed in a `const` |
517 | --> $DIR/disallowed-positions.rs:218:17 | |
518 | | | |
519 | LL | true && let 1 = 1 | |
520 | | ^^^^^^^^^ | |
521 | | | |
522 | = note: for more information, see https://github.com/rust-lang/rust/issues/49146 | |
523 | = help: add `#![feature(const_if_match)]` to the crate attributes to enable | |
524 | ||
525 | error[E0658]: `match` is not allowed in a `const` | |
526 | --> $DIR/disallowed-positions.rs:223:17 | |
527 | | | |
528 | LL | true && let 1 = 1 | |
529 | | ^^^^^^^^^ | |
530 | | | |
531 | = note: for more information, see https://github.com/rust-lang/rust/issues/49146 | |
532 | = help: add `#![feature(const_if_match)]` to the crate attributes to enable | |
533 | ||
534 | error[E0658]: `match` is not allowed in a `const` | |
535 | --> $DIR/disallowed-positions.rs:228:17 | |
536 | | | |
537 | LL | true && let 1 = 1 | |
538 | | ^^^^^^^^^ | |
539 | | | |
540 | = note: for more information, see https://github.com/rust-lang/rust/issues/49146 | |
541 | = help: add `#![feature(const_if_match)]` to the crate attributes to enable | |
542 | ||
dc9dc135 XL |
543 | error[E0308]: mismatched types |
544 | --> $DIR/disallowed-positions.rs:32:8 | |
545 | | | |
546 | LL | if &let 0 = 0 {} | |
e74abb32 XL |
547 | | ^^^^^^^^^^ |
548 | | | | |
60c5eb7d | 549 | | expected `bool`, found `&bool` |
e74abb32 | 550 | | help: consider removing the borrow: `let 0 = 0` |
dc9dc135 XL |
551 | |
552 | error[E0614]: type `bool` cannot be dereferenced | |
553 | --> $DIR/disallowed-positions.rs:36:8 | |
554 | | | |
555 | LL | if *let 0 = 0 {} | |
556 | | ^^^^^^^^^^ | |
557 | ||
558 | error[E0600]: cannot apply unary operator `-` to type `bool` | |
559 | --> $DIR/disallowed-positions.rs:38:8 | |
560 | | | |
561 | LL | if -let 0 = 0 {} | |
562 | | ^^^^^^^^^^ cannot apply unary operator `-` | |
563 | | | |
564 | = note: an implementation of `std::ops::Neg` might be missing for `bool` | |
565 | ||
566 | error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` | |
567 | --> $DIR/disallowed-positions.rs:46:8 | |
568 | | | |
569 | LL | if (let 0 = 0)? {} | |
570 | | ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool` | |
571 | | | |
572 | = help: the trait `std::ops::Try` is not implemented for `bool` | |
573 | = note: required by `std::ops::Try::into_result` | |
574 | ||
575 | error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`) | |
576 | --> $DIR/disallowed-positions.rs:46:8 | |
577 | | | |
60c5eb7d XL |
578 | LL | / fn nested_within_if_expr() { |
579 | LL | | if &let 0 = 0 {} | |
580 | LL | | | |
581 | LL | | | |
582 | ... | | |
583 | LL | | if (let 0 = 0)? {} | |
584 | | | ^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()` | |
585 | ... | | |
586 | LL | | if let true = let true = true {} | |
587 | LL | | } | |
588 | | |_- this function should return `Result` or `Option` to accept `?` | |
dc9dc135 XL |
589 | | |
590 | = help: the trait `std::ops::Try` is not implemented for `()` | |
591 | = note: required by `std::ops::Try::from_error` | |
592 | ||
593 | error[E0308]: mismatched types | |
594 | --> $DIR/disallowed-positions.rs:56:8 | |
595 | | | |
596 | LL | if x = let 0 = 0 {} | |
597 | | ^^^^^^^^^^^^^ | |
598 | | | | |
60c5eb7d | 599 | | expected `bool`, found `()` |
dc9dc135 | 600 | | help: try comparing for equality: `x == let 0 = 0` |
dc9dc135 XL |
601 | |
602 | error[E0308]: mismatched types | |
603 | --> $DIR/disallowed-positions.rs:59:8 | |
604 | | | |
605 | LL | if true..(let 0 = 0) {} | |
60c5eb7d | 606 | | ^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
607 | | |
608 | = note: expected type `bool` | |
60c5eb7d | 609 | found struct `std::ops::Range<bool>` |
dc9dc135 XL |
610 | |
611 | error[E0308]: mismatched types | |
612 | --> $DIR/disallowed-positions.rs:61:8 | |
613 | | | |
614 | LL | if ..(let 0 = 0) {} | |
60c5eb7d | 615 | | ^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::RangeTo` |
dc9dc135 XL |
616 | | |
617 | = note: expected type `bool` | |
60c5eb7d | 618 | found struct `std::ops::RangeTo<bool>` |
dc9dc135 XL |
619 | |
620 | error[E0308]: mismatched types | |
621 | --> $DIR/disallowed-positions.rs:63:8 | |
622 | | | |
623 | LL | if (let 0 = 0).. {} | |
60c5eb7d | 624 | | ^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::RangeFrom` |
dc9dc135 XL |
625 | | |
626 | = note: expected type `bool` | |
60c5eb7d | 627 | found struct `std::ops::RangeFrom<bool>` |
dc9dc135 XL |
628 | |
629 | error[E0308]: mismatched types | |
630 | --> $DIR/disallowed-positions.rs:67:12 | |
631 | | | |
632 | LL | if let Range { start: _, end: _ } = true..true && false {} | |
dfeec247 | 633 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool` |
dc9dc135 | 634 | | | |
60c5eb7d | 635 | | expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
636 | | |
637 | = note: expected type `bool` | |
60c5eb7d | 638 | found struct `std::ops::Range<_>` |
dc9dc135 XL |
639 | |
640 | error[E0308]: mismatched types | |
641 | --> $DIR/disallowed-positions.rs:67:8 | |
642 | | | |
643 | LL | if let Range { start: _, end: _ } = true..true && false {} | |
60c5eb7d | 644 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
645 | | |
646 | = note: expected type `bool` | |
60c5eb7d | 647 | found struct `std::ops::Range<bool>` |
dc9dc135 XL |
648 | |
649 | error[E0308]: mismatched types | |
650 | --> $DIR/disallowed-positions.rs:71:12 | |
651 | | | |
652 | LL | if let Range { start: _, end: _ } = true..true || false {} | |
dfeec247 | 653 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool` |
dc9dc135 | 654 | | | |
60c5eb7d | 655 | | expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
656 | | |
657 | = note: expected type `bool` | |
60c5eb7d | 658 | found struct `std::ops::Range<_>` |
dc9dc135 XL |
659 | |
660 | error[E0308]: mismatched types | |
661 | --> $DIR/disallowed-positions.rs:71:8 | |
662 | | | |
663 | LL | if let Range { start: _, end: _ } = true..true || false {} | |
60c5eb7d | 664 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
665 | | |
666 | = note: expected type `bool` | |
60c5eb7d | 667 | found struct `std::ops::Range<bool>` |
dc9dc135 XL |
668 | |
669 | error[E0308]: mismatched types | |
670 | --> $DIR/disallowed-positions.rs:78:12 | |
671 | | | |
672 | LL | if let Range { start: F, end } = F..|| true {} | |
673 | | ^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found struct `std::ops::Range` | |
674 | | | |
60c5eb7d XL |
675 | = note: expected fn pointer `fn() -> bool` |
676 | found struct `std::ops::Range<_>` | |
dc9dc135 XL |
677 | |
678 | error[E0308]: mismatched types | |
679 | --> $DIR/disallowed-positions.rs:78:41 | |
680 | | | |
681 | LL | if let Range { start: F, end } = F..|| true {} | |
60c5eb7d | 682 | | ^^^^^^^ expected `bool`, found closure |
dc9dc135 XL |
683 | | |
684 | = note: expected type `bool` | |
60c5eb7d | 685 | found closure `[closure@$DIR/disallowed-positions.rs:78:41: 78:48]` |
dc9dc135 XL |
686 | |
687 | error[E0308]: mismatched types | |
688 | --> $DIR/disallowed-positions.rs:78:8 | |
689 | | | |
690 | LL | if let Range { start: F, end } = F..|| true {} | |
60c5eb7d | 691 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
692 | | |
693 | = note: expected type `bool` | |
60c5eb7d | 694 | found struct `std::ops::Range<bool>` |
dc9dc135 XL |
695 | |
696 | error[E0308]: mismatched types | |
697 | --> $DIR/disallowed-positions.rs:86:12 | |
698 | | | |
699 | LL | if let Range { start: true, end } = t..&&false {} | |
dfeec247 | 700 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `&&bool` |
dc9dc135 | 701 | | | |
60c5eb7d | 702 | | expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
703 | | |
704 | = note: expected type `bool` | |
60c5eb7d | 705 | found struct `std::ops::Range<_>` |
dc9dc135 XL |
706 | |
707 | error[E0308]: mismatched types | |
708 | --> $DIR/disallowed-positions.rs:86:44 | |
709 | | | |
710 | LL | if let Range { start: true, end } = t..&&false {} | |
60c5eb7d | 711 | | ^^^^^^^ expected `bool`, found `&&bool` |
dc9dc135 XL |
712 | |
713 | error[E0308]: mismatched types | |
714 | --> $DIR/disallowed-positions.rs:86:8 | |
715 | | | |
716 | LL | if let Range { start: true, end } = t..&&false {} | |
60c5eb7d | 717 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
718 | | |
719 | = note: expected type `bool` | |
60c5eb7d | 720 | found struct `std::ops::Range<bool>` |
dc9dc135 XL |
721 | |
722 | error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` | |
723 | --> $DIR/disallowed-positions.rs:42:20 | |
724 | | | |
725 | LL | if let 0 = 0? {} | |
726 | | ^^ the `?` operator cannot be applied to type `{integer}` | |
727 | | | |
728 | = help: the trait `std::ops::Try` is not implemented for `{integer}` | |
729 | = note: required by `std::ops::Try::into_result` | |
730 | ||
731 | error[E0308]: mismatched types | |
732 | --> $DIR/disallowed-positions.rs:96:11 | |
733 | | | |
734 | LL | while &let 0 = 0 {} | |
e74abb32 XL |
735 | | ^^^^^^^^^^ |
736 | | | | |
60c5eb7d | 737 | | expected `bool`, found `&bool` |
e74abb32 | 738 | | help: consider removing the borrow: `let 0 = 0` |
dc9dc135 XL |
739 | |
740 | error[E0614]: type `bool` cannot be dereferenced | |
741 | --> $DIR/disallowed-positions.rs:100:11 | |
742 | | | |
743 | LL | while *let 0 = 0 {} | |
744 | | ^^^^^^^^^^ | |
745 | ||
746 | error[E0600]: cannot apply unary operator `-` to type `bool` | |
747 | --> $DIR/disallowed-positions.rs:102:11 | |
748 | | | |
749 | LL | while -let 0 = 0 {} | |
750 | | ^^^^^^^^^^ cannot apply unary operator `-` | |
751 | | | |
752 | = note: an implementation of `std::ops::Neg` might be missing for `bool` | |
753 | ||
754 | error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` | |
755 | --> $DIR/disallowed-positions.rs:110:11 | |
756 | | | |
757 | LL | while (let 0 = 0)? {} | |
758 | | ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool` | |
759 | | | |
760 | = help: the trait `std::ops::Try` is not implemented for `bool` | |
761 | = note: required by `std::ops::Try::into_result` | |
762 | ||
763 | error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`) | |
764 | --> $DIR/disallowed-positions.rs:110:11 | |
765 | | | |
60c5eb7d XL |
766 | LL | / fn nested_within_while_expr() { |
767 | LL | | while &let 0 = 0 {} | |
768 | LL | | | |
769 | LL | | | |
770 | ... | | |
771 | LL | | while (let 0 = 0)? {} | |
772 | | | ^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()` | |
773 | ... | | |
774 | LL | | while let true = let true = true {} | |
775 | LL | | } | |
776 | | |_- this function should return `Result` or `Option` to accept `?` | |
dc9dc135 XL |
777 | | |
778 | = help: the trait `std::ops::Try` is not implemented for `()` | |
779 | = note: required by `std::ops::Try::from_error` | |
780 | ||
781 | error[E0308]: mismatched types | |
782 | --> $DIR/disallowed-positions.rs:120:11 | |
783 | | | |
784 | LL | while x = let 0 = 0 {} | |
785 | | ^^^^^^^^^^^^^ | |
786 | | | | |
60c5eb7d | 787 | | expected `bool`, found `()` |
dc9dc135 | 788 | | help: try comparing for equality: `x == let 0 = 0` |
dc9dc135 XL |
789 | |
790 | error[E0308]: mismatched types | |
791 | --> $DIR/disallowed-positions.rs:123:11 | |
792 | | | |
793 | LL | while true..(let 0 = 0) {} | |
60c5eb7d | 794 | | ^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
795 | | |
796 | = note: expected type `bool` | |
60c5eb7d | 797 | found struct `std::ops::Range<bool>` |
dc9dc135 XL |
798 | |
799 | error[E0308]: mismatched types | |
800 | --> $DIR/disallowed-positions.rs:125:11 | |
801 | | | |
802 | LL | while ..(let 0 = 0) {} | |
60c5eb7d | 803 | | ^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::RangeTo` |
dc9dc135 XL |
804 | | |
805 | = note: expected type `bool` | |
60c5eb7d | 806 | found struct `std::ops::RangeTo<bool>` |
dc9dc135 XL |
807 | |
808 | error[E0308]: mismatched types | |
809 | --> $DIR/disallowed-positions.rs:127:11 | |
810 | | | |
811 | LL | while (let 0 = 0).. {} | |
60c5eb7d | 812 | | ^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::RangeFrom` |
dc9dc135 XL |
813 | | |
814 | = note: expected type `bool` | |
60c5eb7d | 815 | found struct `std::ops::RangeFrom<bool>` |
dc9dc135 XL |
816 | |
817 | error[E0308]: mismatched types | |
818 | --> $DIR/disallowed-positions.rs:131:15 | |
819 | | | |
820 | LL | while let Range { start: _, end: _ } = true..true && false {} | |
dfeec247 | 821 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool` |
dc9dc135 | 822 | | | |
60c5eb7d | 823 | | expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
824 | | |
825 | = note: expected type `bool` | |
60c5eb7d | 826 | found struct `std::ops::Range<_>` |
dc9dc135 XL |
827 | |
828 | error[E0308]: mismatched types | |
829 | --> $DIR/disallowed-positions.rs:131:11 | |
830 | | | |
831 | LL | while let Range { start: _, end: _ } = true..true && false {} | |
60c5eb7d | 832 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
833 | | |
834 | = note: expected type `bool` | |
60c5eb7d | 835 | found struct `std::ops::Range<bool>` |
dc9dc135 XL |
836 | |
837 | error[E0308]: mismatched types | |
838 | --> $DIR/disallowed-positions.rs:135:15 | |
839 | | | |
840 | LL | while let Range { start: _, end: _ } = true..true || false {} | |
dfeec247 | 841 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool` |
dc9dc135 | 842 | | | |
60c5eb7d | 843 | | expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
844 | | |
845 | = note: expected type `bool` | |
60c5eb7d | 846 | found struct `std::ops::Range<_>` |
dc9dc135 XL |
847 | |
848 | error[E0308]: mismatched types | |
849 | --> $DIR/disallowed-positions.rs:135:11 | |
850 | | | |
851 | LL | while let Range { start: _, end: _ } = true..true || false {} | |
60c5eb7d | 852 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
853 | | |
854 | = note: expected type `bool` | |
60c5eb7d | 855 | found struct `std::ops::Range<bool>` |
dc9dc135 XL |
856 | |
857 | error[E0308]: mismatched types | |
858 | --> $DIR/disallowed-positions.rs:142:15 | |
859 | | | |
860 | LL | while let Range { start: F, end } = F..|| true {} | |
861 | | ^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found struct `std::ops::Range` | |
862 | | | |
60c5eb7d XL |
863 | = note: expected fn pointer `fn() -> bool` |
864 | found struct `std::ops::Range<_>` | |
dc9dc135 XL |
865 | |
866 | error[E0308]: mismatched types | |
867 | --> $DIR/disallowed-positions.rs:142:44 | |
868 | | | |
869 | LL | while let Range { start: F, end } = F..|| true {} | |
60c5eb7d | 870 | | ^^^^^^^ expected `bool`, found closure |
dc9dc135 XL |
871 | | |
872 | = note: expected type `bool` | |
60c5eb7d | 873 | found closure `[closure@$DIR/disallowed-positions.rs:142:44: 142:51]` |
dc9dc135 XL |
874 | |
875 | error[E0308]: mismatched types | |
876 | --> $DIR/disallowed-positions.rs:142:11 | |
877 | | | |
878 | LL | while let Range { start: F, end } = F..|| true {} | |
60c5eb7d | 879 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
880 | | |
881 | = note: expected type `bool` | |
60c5eb7d | 882 | found struct `std::ops::Range<bool>` |
dc9dc135 XL |
883 | |
884 | error[E0308]: mismatched types | |
885 | --> $DIR/disallowed-positions.rs:150:15 | |
886 | | | |
887 | LL | while let Range { start: true, end } = t..&&false {} | |
dfeec247 | 888 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `&&bool` |
dc9dc135 | 889 | | | |
60c5eb7d | 890 | | expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
891 | | |
892 | = note: expected type `bool` | |
60c5eb7d | 893 | found struct `std::ops::Range<_>` |
dc9dc135 XL |
894 | |
895 | error[E0308]: mismatched types | |
896 | --> $DIR/disallowed-positions.rs:150:47 | |
897 | | | |
898 | LL | while let Range { start: true, end } = t..&&false {} | |
60c5eb7d | 899 | | ^^^^^^^ expected `bool`, found `&&bool` |
dc9dc135 XL |
900 | |
901 | error[E0308]: mismatched types | |
902 | --> $DIR/disallowed-positions.rs:150:11 | |
903 | | | |
904 | LL | while let Range { start: true, end } = t..&&false {} | |
60c5eb7d | 905 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
906 | | |
907 | = note: expected type `bool` | |
60c5eb7d | 908 | found struct `std::ops::Range<bool>` |
dc9dc135 XL |
909 | |
910 | error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` | |
911 | --> $DIR/disallowed-positions.rs:106:23 | |
912 | | | |
913 | LL | while let 0 = 0? {} | |
914 | | ^^ the `?` operator cannot be applied to type `{integer}` | |
915 | | | |
916 | = help: the trait `std::ops::Try` is not implemented for `{integer}` | |
917 | = note: required by `std::ops::Try::into_result` | |
918 | ||
919 | error[E0614]: type `bool` cannot be dereferenced | |
920 | --> $DIR/disallowed-positions.rs:173:5 | |
921 | | | |
922 | LL | *let 0 = 0; | |
923 | | ^^^^^^^^^^ | |
924 | ||
925 | error[E0600]: cannot apply unary operator `-` to type `bool` | |
926 | --> $DIR/disallowed-positions.rs:175:5 | |
927 | | | |
928 | LL | -let 0 = 0; | |
929 | | ^^^^^^^^^^ cannot apply unary operator `-` | |
930 | | | |
931 | = note: an implementation of `std::ops::Neg` might be missing for `bool` | |
932 | ||
933 | error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` | |
934 | --> $DIR/disallowed-positions.rs:183:5 | |
935 | | | |
936 | LL | (let 0 = 0)?; | |
937 | | ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool` | |
938 | | | |
939 | = help: the trait `std::ops::Try` is not implemented for `bool` | |
940 | = note: required by `std::ops::Try::into_result` | |
941 | ||
942 | error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`) | |
943 | --> $DIR/disallowed-positions.rs:183:5 | |
944 | | | |
60c5eb7d XL |
945 | LL | / fn outside_if_and_while_expr() { |
946 | LL | | &let 0 = 0; | |
947 | LL | | | |
948 | LL | | !let 0 = 0; | |
949 | ... | | |
950 | LL | | (let 0 = 0)?; | |
951 | | | ^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()` | |
952 | ... | | |
953 | LL | | | |
954 | LL | | } | |
955 | | |_- this function should return `Result` or `Option` to accept `?` | |
dc9dc135 XL |
956 | | |
957 | = help: the trait `std::ops::Try` is not implemented for `()` | |
958 | = note: required by `std::ops::Try::from_error` | |
959 | ||
960 | error[E0308]: mismatched types | |
961 | --> $DIR/disallowed-positions.rs:198:10 | |
962 | | | |
963 | LL | (let Range { start: _, end: _ } = true..true || false); | |
dfeec247 | 964 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool` |
dc9dc135 | 965 | | | |
60c5eb7d | 966 | | expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
967 | | |
968 | = note: expected type `bool` | |
60c5eb7d | 969 | found struct `std::ops::Range<_>` |
dc9dc135 XL |
970 | |
971 | error[E0308]: mismatched types | |
972 | --> $DIR/disallowed-positions.rs:207:5 | |
973 | | | |
974 | LL | fn outside_if_and_while_expr() { | |
975 | | - help: try adding a return type: `-> &bool` | |
976 | ... | |
977 | LL | &let 0 = 0 | |
60c5eb7d | 978 | | ^^^^^^^^^^ expected `()`, found `&bool` |
dc9dc135 XL |
979 | |
980 | error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` | |
981 | --> $DIR/disallowed-positions.rs:179:17 | |
982 | | | |
983 | LL | let 0 = 0?; | |
984 | | ^^ the `?` operator cannot be applied to type `{integer}` | |
985 | | | |
986 | = help: the trait `std::ops::Try` is not implemented for `{integer}` | |
987 | = note: required by `std::ops::Try::into_result` | |
988 | ||
60c5eb7d | 989 | error: aborting due to 106 previous errors |
dc9dc135 | 990 | |
60c5eb7d XL |
991 | Some errors have detailed explanations: E0277, E0308, E0600, E0614, E0658. |
992 | For more information about an error, try `rustc --explain E0277`. |