]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr
implement IsZero for Saturating and Wrapping
[rust.git] / src / test / ui / rfc-2497-if-let-chains / disallowed-positions.stderr
1 error: expected expression, found `let` statement
2   --> $DIR/disallowed-positions.rs:29:9
3    |
4 LL |     if (let 0 = 1) {}
5    |         ^^^
6
7 error: expected expression, found `let` statement
8   --> $DIR/disallowed-positions.rs:33:11
9    |
10 LL |     if (((let 0 = 1))) {}
11    |           ^^^
12
13 error: expected expression, found `let` statement
14   --> $DIR/disallowed-positions.rs:37:9
15    |
16 LL |     if (let 0 = 1) && true {}
17    |         ^^^
18
19 error: expected expression, found `let` statement
20   --> $DIR/disallowed-positions.rs:41:17
21    |
22 LL |     if true && (let 0 = 1) {}
23    |                 ^^^
24
25 error: expected expression, found `let` statement
26   --> $DIR/disallowed-positions.rs:45:9
27    |
28 LL |     if (let 0 = 1) && (let 0 = 1) {}
29    |         ^^^
30
31 error: expected expression, found `let` statement
32   --> $DIR/disallowed-positions.rs:45:24
33    |
34 LL |     if (let 0 = 1) && (let 0 = 1) {}
35    |                        ^^^
36
37 error: expected expression, found `let` statement
38   --> $DIR/disallowed-positions.rs:51:35
39    |
40 LL |     if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
41    |                                   ^^^
42
43 error: expected expression, found `let` statement
44   --> $DIR/disallowed-positions.rs:51:48
45    |
46 LL |     if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
47    |                                                ^^^
48
49 error: expected expression, found `let` statement
50   --> $DIR/disallowed-positions.rs:51:61
51    |
52 LL |     if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
53    |                                                             ^^^
54
55 error: expected expression, found `let` statement
56   --> $DIR/disallowed-positions.rs:61:12
57    |
58 LL |     while (let 0 = 1) {}
59    |            ^^^
60
61 error: expected expression, found `let` statement
62   --> $DIR/disallowed-positions.rs:65:14
63    |
64 LL |     while (((let 0 = 1))) {}
65    |              ^^^
66
67 error: expected expression, found `let` statement
68   --> $DIR/disallowed-positions.rs:69:12
69    |
70 LL |     while (let 0 = 1) && true {}
71    |            ^^^
72
73 error: expected expression, found `let` statement
74   --> $DIR/disallowed-positions.rs:73:20
75    |
76 LL |     while true && (let 0 = 1) {}
77    |                    ^^^
78
79 error: expected expression, found `let` statement
80   --> $DIR/disallowed-positions.rs:77:12
81    |
82 LL |     while (let 0 = 1) && (let 0 = 1) {}
83    |            ^^^
84
85 error: expected expression, found `let` statement
86   --> $DIR/disallowed-positions.rs:77:27
87    |
88 LL |     while (let 0 = 1) && (let 0 = 1) {}
89    |                           ^^^
90
91 error: expected expression, found `let` statement
92   --> $DIR/disallowed-positions.rs:83:38
93    |
94 LL |     while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
95    |                                      ^^^
96
97 error: expected expression, found `let` statement
98   --> $DIR/disallowed-positions.rs:83:51
99    |
100 LL |     while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
101    |                                                   ^^^
102
103 error: expected expression, found `let` statement
104   --> $DIR/disallowed-positions.rs:83:64
105    |
106 LL |     while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
107    |                                                                ^^^
108
109 error: expected expression, found `let` statement
110   --> $DIR/disallowed-positions.rs:110:9
111    |
112 LL |     if &let 0 = 0 {}
113    |         ^^^
114
115 error: expected expression, found `let` statement
116   --> $DIR/disallowed-positions.rs:115:9
117    |
118 LL |     if !let 0 = 0 {}
119    |         ^^^
120
121 error: expected expression, found `let` statement
122   --> $DIR/disallowed-positions.rs:118:9
123    |
124 LL |     if *let 0 = 0 {}
125    |         ^^^
126
127 error: expected expression, found `let` statement
128   --> $DIR/disallowed-positions.rs:122:9
129    |
130 LL |     if -let 0 = 0 {}
131    |         ^^^
132
133 error: expected expression, found `let` statement
134   --> $DIR/disallowed-positions.rs:132:9
135    |
136 LL |     if (let 0 = 0)? {}
137    |         ^^^
138
139 error: expected expression, found `let` statement
140   --> $DIR/disallowed-positions.rs:138:16
141    |
142 LL |     if true || let 0 = 0 {}
143    |                ^^^
144
145 error: expected expression, found `let` statement
146   --> $DIR/disallowed-positions.rs:141:17
147    |
148 LL |     if (true || let 0 = 0) {}
149    |                 ^^^
150
151 error: expected expression, found `let` statement
152   --> $DIR/disallowed-positions.rs:144:25
153    |
154 LL |     if true && (true || let 0 = 0) {}
155    |                         ^^^
156
157 error: expected expression, found `let` statement
158   --> $DIR/disallowed-positions.rs:147:25
159    |
160 LL |     if true || (true && let 0 = 0) {}
161    |                         ^^^
162
163 error: expected expression, found `let` statement
164   --> $DIR/disallowed-positions.rs:152:12
165    |
166 LL |     if x = let 0 = 0 {}
167    |            ^^^
168
169 error: expected expression, found `let` statement
170   --> $DIR/disallowed-positions.rs:157:15
171    |
172 LL |     if true..(let 0 = 0) {}
173    |               ^^^
174
175 error: expected expression, found `let` statement
176   --> $DIR/disallowed-positions.rs:161:11
177    |
178 LL |     if ..(let 0 = 0) {}
179    |           ^^^
180
181 error: expected expression, found `let` statement
182   --> $DIR/disallowed-positions.rs:165:9
183    |
184 LL |     if (let 0 = 0).. {}
185    |         ^^^
186
187 error: expected expression, found `let` statement
188   --> $DIR/disallowed-positions.rs:196:19
189    |
190 LL |     if let true = let true = true {}
191    |                   ^^^
192
193 error: expected expression, found `let` statement
194   --> $DIR/disallowed-positions.rs:202:12
195    |
196 LL |     while &let 0 = 0 {}
197    |            ^^^
198
199 error: expected expression, found `let` statement
200   --> $DIR/disallowed-positions.rs:207:12
201    |
202 LL |     while !let 0 = 0 {}
203    |            ^^^
204
205 error: expected expression, found `let` statement
206   --> $DIR/disallowed-positions.rs:210:12
207    |
208 LL |     while *let 0 = 0 {}
209    |            ^^^
210
211 error: expected expression, found `let` statement
212   --> $DIR/disallowed-positions.rs:214:12
213    |
214 LL |     while -let 0 = 0 {}
215    |            ^^^
216
217 error: expected expression, found `let` statement
218   --> $DIR/disallowed-positions.rs:224:12
219    |
220 LL |     while (let 0 = 0)? {}
221    |            ^^^
222
223 error: expected expression, found `let` statement
224   --> $DIR/disallowed-positions.rs:230:19
225    |
226 LL |     while true || let 0 = 0 {}
227    |                   ^^^
228
229 error: expected expression, found `let` statement
230   --> $DIR/disallowed-positions.rs:233:20
231    |
232 LL |     while (true || let 0 = 0) {}
233    |                    ^^^
234
235 error: expected expression, found `let` statement
236   --> $DIR/disallowed-positions.rs:236:28
237    |
238 LL |     while true && (true || let 0 = 0) {}
239    |                            ^^^
240
241 error: expected expression, found `let` statement
242   --> $DIR/disallowed-positions.rs:239:28
243    |
244 LL |     while true || (true && let 0 = 0) {}
245    |                            ^^^
246
247 error: expected expression, found `let` statement
248   --> $DIR/disallowed-positions.rs:244:15
249    |
250 LL |     while x = let 0 = 0 {}
251    |               ^^^
252
253 error: expected expression, found `let` statement
254   --> $DIR/disallowed-positions.rs:249:18
255    |
256 LL |     while true..(let 0 = 0) {}
257    |                  ^^^
258
259 error: expected expression, found `let` statement
260   --> $DIR/disallowed-positions.rs:253:14
261    |
262 LL |     while ..(let 0 = 0) {}
263    |              ^^^
264
265 error: expected expression, found `let` statement
266   --> $DIR/disallowed-positions.rs:257:12
267    |
268 LL |     while (let 0 = 0).. {}
269    |            ^^^
270
271 error: expected expression, found `let` statement
272   --> $DIR/disallowed-positions.rs:288:22
273    |
274 LL |     while let true = let true = true {}
275    |                      ^^^
276
277 error: expected expression, found `let` statement
278   --> $DIR/disallowed-positions.rs:304:6
279    |
280 LL |     &let 0 = 0;
281    |      ^^^
282
283 error: expected expression, found `let` statement
284   --> $DIR/disallowed-positions.rs:308:6
285    |
286 LL |     !let 0 = 0;
287    |      ^^^
288
289 error: expected expression, found `let` statement
290   --> $DIR/disallowed-positions.rs:311:6
291    |
292 LL |     *let 0 = 0;
293    |      ^^^
294
295 error: expected expression, found `let` statement
296   --> $DIR/disallowed-positions.rs:315:6
297    |
298 LL |     -let 0 = 0;
299    |      ^^^
300
301 error: expected expression, found `let` statement
302   --> $DIR/disallowed-positions.rs:325:6
303    |
304 LL |     (let 0 = 0)?;
305    |      ^^^
306
307 error: expected expression, found `let` statement
308   --> $DIR/disallowed-positions.rs:331:13
309    |
310 LL |     true || let 0 = 0;
311    |             ^^^
312
313 error: expected expression, found `let` statement
314   --> $DIR/disallowed-positions.rs:334:14
315    |
316 LL |     (true || let 0 = 0);
317    |              ^^^
318
319 error: expected expression, found `let` statement
320   --> $DIR/disallowed-positions.rs:337:22
321    |
322 LL |     true && (true || let 0 = 0);
323    |                      ^^^
324
325 error: expected expression, found `let` statement
326   --> $DIR/disallowed-positions.rs:342:9
327    |
328 LL |     x = let 0 = 0;
329    |         ^^^
330
331 error: expected expression, found `let` statement
332   --> $DIR/disallowed-positions.rs:346:12
333    |
334 LL |     true..(let 0 = 0);
335    |            ^^^
336
337 error: expected expression, found `let` statement
338   --> $DIR/disallowed-positions.rs:349:8
339    |
340 LL |     ..(let 0 = 0);
341    |        ^^^
342
343 error: expected expression, found `let` statement
344   --> $DIR/disallowed-positions.rs:352:6
345    |
346 LL |     (let 0 = 0)..;
347    |      ^^^
348
349 error: expected expression, found `let` statement
350   --> $DIR/disallowed-positions.rs:356:6
351    |
352 LL |     (let Range { start: _, end: _ } = true..true || false);
353    |      ^^^
354
355 error: expected expression, found `let` statement
356   --> $DIR/disallowed-positions.rs:361:6
357    |
358 LL |     (let true = let true = true);
359    |      ^^^
360
361 error: expected expression, found `let` statement
362   --> $DIR/disallowed-positions.rs:361:17
363    |
364 LL |     (let true = let true = true);
365    |                 ^^^
366
367 error: expected expression, found `let` statement
368   --> $DIR/disallowed-positions.rs:368:25
369    |
370 LL |         let x = true && let y = 1;
371    |                         ^^^
372
373 error: expected expression, found `let` statement
374   --> $DIR/disallowed-positions.rs:374:19
375    |
376 LL |         [1, 2, 3][let _ = ()]
377    |                   ^^^
378
379 error: expected expression, found `let` statement
380   --> $DIR/disallowed-positions.rs:379:6
381    |
382 LL |     &let 0 = 0
383    |      ^^^
384
385 error: expected expression, found `let` statement
386   --> $DIR/disallowed-positions.rs:391:17
387    |
388 LL |         true && let 1 = 1
389    |                 ^^^
390
391 error: expected expression, found `let` statement
392   --> $DIR/disallowed-positions.rs:397:17
393    |
394 LL |         true && let 1 = 1
395    |                 ^^^
396
397 error: expected expression, found `let` statement
398   --> $DIR/disallowed-positions.rs:403:17
399    |
400 LL |         true && let 1 = 1
401    |                 ^^^
402
403 error: expected expression, found `let` statement
404   --> $DIR/disallowed-positions.rs:415:17
405    |
406 LL |         true && let 1 = 1
407    |                 ^^^
408
409 error: expressions must be enclosed in braces to be used as const generic arguments
410   --> $DIR/disallowed-positions.rs:415:9
411    |
412 LL |         true && let 1 = 1
413    |         ^^^^^^^^^^^^^^^^^
414    |
415 help: enclose the `const` expression in braces
416    |
417 LL |         { true && let 1 = 1 }
418    |         +                   +
419
420 error: expected expression, found `let` statement
421   --> $DIR/disallowed-positions.rs:425:9
422    |
423 LL |     if (let Some(a) = opt && true) {
424    |         ^^^
425
426 error: expected expression, found `let` statement
427   --> $DIR/disallowed-positions.rs:430:9
428    |
429 LL |     if (let Some(a) = opt) && true {
430    |         ^^^
431
432 error: expected expression, found `let` statement
433   --> $DIR/disallowed-positions.rs:434:9
434    |
435 LL |     if (let Some(a) = opt) && (let Some(b) = a) {
436    |         ^^^
437
438 error: expected expression, found `let` statement
439   --> $DIR/disallowed-positions.rs:434:32
440    |
441 LL |     if (let Some(a) = opt) && (let Some(b) = a) {
442    |                                ^^^
443
444 error: expected expression, found `let` statement
445   --> $DIR/disallowed-positions.rs:443:9
446    |
447 LL |     if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
448    |         ^^^
449
450 error: expected expression, found `let` statement
451   --> $DIR/disallowed-positions.rs:443:31
452    |
453 LL |     if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
454    |                               ^^^
455
456 error: expected expression, found `let` statement
457   --> $DIR/disallowed-positions.rs:449:9
458    |
459 LL |     if (let Some(a) = opt && (let Some(b) = a)) && true {
460    |         ^^^
461
462 error: expected expression, found `let` statement
463   --> $DIR/disallowed-positions.rs:449:31
464    |
465 LL |     if (let Some(a) = opt && (let Some(b) = a)) && true {
466    |                               ^^^
467
468 error: expected expression, found `let` statement
469   --> $DIR/disallowed-positions.rs:455:9
470    |
471 LL |     if (let Some(a) = opt && (true)) && true {
472    |         ^^^
473
474 error: expected expression, found `let` statement
475   --> $DIR/disallowed-positions.rs:472:22
476    |
477 LL |     let x = (true && let y = 1);
478    |                      ^^^
479
480 error: expected expression, found `let` statement
481   --> $DIR/disallowed-positions.rs:477:20
482    |
483 LL |         ([1, 2, 3][let _ = ()])
484    |                    ^^^
485
486 error: expected expression, found `let` statement
487   --> $DIR/disallowed-positions.rs:99:16
488    |
489 LL |     use_expr!((let 0 = 1 && 0 == 0));
490    |                ^^^
491
492 error: expected expression, found `let` statement
493   --> $DIR/disallowed-positions.rs:103:16
494    |
495 LL |     use_expr!((let 0 = 1));
496    |                ^^^
497
498 error: `let` expressions are not supported here
499   --> $DIR/disallowed-positions.rs:29:9
500    |
501 LL |     if (let 0 = 1) {}
502    |         ^^^^^^^^^
503    |
504    = note: only supported directly in conditions of `if` and `while` expressions
505 note: `let`s wrapped in parentheses are not supported in a context with let chains
506   --> $DIR/disallowed-positions.rs:29:9
507    |
508 LL |     if (let 0 = 1) {}
509    |         ^^^^^^^^^
510
511 error: `let` expressions are not supported here
512   --> $DIR/disallowed-positions.rs:33:11
513    |
514 LL |     if (((let 0 = 1))) {}
515    |           ^^^^^^^^^
516    |
517    = note: only supported directly in conditions of `if` and `while` expressions
518 note: `let`s wrapped in parentheses are not supported in a context with let chains
519   --> $DIR/disallowed-positions.rs:33:11
520    |
521 LL |     if (((let 0 = 1))) {}
522    |           ^^^^^^^^^
523
524 error: `let` expressions are not supported here
525   --> $DIR/disallowed-positions.rs:37:9
526    |
527 LL |     if (let 0 = 1) && true {}
528    |         ^^^^^^^^^
529    |
530    = note: only supported directly in conditions of `if` and `while` expressions
531 note: `let`s wrapped in parentheses are not supported in a context with let chains
532   --> $DIR/disallowed-positions.rs:37:9
533    |
534 LL |     if (let 0 = 1) && true {}
535    |         ^^^^^^^^^
536
537 error: `let` expressions are not supported here
538   --> $DIR/disallowed-positions.rs:41:17
539    |
540 LL |     if true && (let 0 = 1) {}
541    |                 ^^^^^^^^^
542    |
543    = note: only supported directly in conditions of `if` and `while` expressions
544 note: `let`s wrapped in parentheses are not supported in a context with let chains
545   --> $DIR/disallowed-positions.rs:41:17
546    |
547 LL |     if true && (let 0 = 1) {}
548    |                 ^^^^^^^^^
549
550 error: `let` expressions are not supported here
551   --> $DIR/disallowed-positions.rs:45:9
552    |
553 LL |     if (let 0 = 1) && (let 0 = 1) {}
554    |         ^^^^^^^^^
555    |
556    = note: only supported directly in conditions of `if` and `while` expressions
557 note: `let`s wrapped in parentheses are not supported in a context with let chains
558   --> $DIR/disallowed-positions.rs:45:9
559    |
560 LL |     if (let 0 = 1) && (let 0 = 1) {}
561    |         ^^^^^^^^^
562
563 error: `let` expressions are not supported here
564   --> $DIR/disallowed-positions.rs:45:24
565    |
566 LL |     if (let 0 = 1) && (let 0 = 1) {}
567    |                        ^^^^^^^^^
568    |
569    = note: only supported directly in conditions of `if` and `while` expressions
570 note: `let`s wrapped in parentheses are not supported in a context with let chains
571   --> $DIR/disallowed-positions.rs:45:24
572    |
573 LL |     if (let 0 = 1) && (let 0 = 1) {}
574    |                        ^^^^^^^^^
575
576 error: `let` expressions are not supported here
577   --> $DIR/disallowed-positions.rs:51:35
578    |
579 LL |     if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
580    |                                   ^^^^^^^^^
581    |
582    = note: only supported directly in conditions of `if` and `while` expressions
583 note: `let`s wrapped in parentheses are not supported in a context with let chains
584   --> $DIR/disallowed-positions.rs:51:35
585    |
586 LL |     if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
587    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
588
589 error: `let` expressions are not supported here
590   --> $DIR/disallowed-positions.rs:51:48
591    |
592 LL |     if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
593    |                                                ^^^^^^^^^
594    |
595    = note: only supported directly in conditions of `if` and `while` expressions
596 note: `let`s wrapped in parentheses are not supported in a context with let chains
597   --> $DIR/disallowed-positions.rs:51:35
598    |
599 LL |     if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
600    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
601
602 error: `let` expressions are not supported here
603   --> $DIR/disallowed-positions.rs:51:61
604    |
605 LL |     if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
606    |                                                             ^^^^^^^^^
607    |
608    = note: only supported directly in conditions of `if` and `while` expressions
609 note: `let`s wrapped in parentheses are not supported in a context with let chains
610   --> $DIR/disallowed-positions.rs:51:35
611    |
612 LL |     if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
613    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
614
615 error: `let` expressions are not supported here
616   --> $DIR/disallowed-positions.rs:61:12
617    |
618 LL |     while (let 0 = 1) {}
619    |            ^^^^^^^^^
620    |
621    = note: only supported directly in conditions of `if` and `while` expressions
622 note: `let`s wrapped in parentheses are not supported in a context with let chains
623   --> $DIR/disallowed-positions.rs:61:12
624    |
625 LL |     while (let 0 = 1) {}
626    |            ^^^^^^^^^
627
628 error: `let` expressions are not supported here
629   --> $DIR/disallowed-positions.rs:65:14
630    |
631 LL |     while (((let 0 = 1))) {}
632    |              ^^^^^^^^^
633    |
634    = note: only supported directly in conditions of `if` and `while` expressions
635 note: `let`s wrapped in parentheses are not supported in a context with let chains
636   --> $DIR/disallowed-positions.rs:65:14
637    |
638 LL |     while (((let 0 = 1))) {}
639    |              ^^^^^^^^^
640
641 error: `let` expressions are not supported here
642   --> $DIR/disallowed-positions.rs:69:12
643    |
644 LL |     while (let 0 = 1) && true {}
645    |            ^^^^^^^^^
646    |
647    = note: only supported directly in conditions of `if` and `while` expressions
648 note: `let`s wrapped in parentheses are not supported in a context with let chains
649   --> $DIR/disallowed-positions.rs:69:12
650    |
651 LL |     while (let 0 = 1) && true {}
652    |            ^^^^^^^^^
653
654 error: `let` expressions are not supported here
655   --> $DIR/disallowed-positions.rs:73:20
656    |
657 LL |     while true && (let 0 = 1) {}
658    |                    ^^^^^^^^^
659    |
660    = note: only supported directly in conditions of `if` and `while` expressions
661 note: `let`s wrapped in parentheses are not supported in a context with let chains
662   --> $DIR/disallowed-positions.rs:73:20
663    |
664 LL |     while true && (let 0 = 1) {}
665    |                    ^^^^^^^^^
666
667 error: `let` expressions are not supported here
668   --> $DIR/disallowed-positions.rs:77:12
669    |
670 LL |     while (let 0 = 1) && (let 0 = 1) {}
671    |            ^^^^^^^^^
672    |
673    = note: only supported directly in conditions of `if` and `while` expressions
674 note: `let`s wrapped in parentheses are not supported in a context with let chains
675   --> $DIR/disallowed-positions.rs:77:12
676    |
677 LL |     while (let 0 = 1) && (let 0 = 1) {}
678    |            ^^^^^^^^^
679
680 error: `let` expressions are not supported here
681   --> $DIR/disallowed-positions.rs:77:27
682    |
683 LL |     while (let 0 = 1) && (let 0 = 1) {}
684    |                           ^^^^^^^^^
685    |
686    = note: only supported directly in conditions of `if` and `while` expressions
687 note: `let`s wrapped in parentheses are not supported in a context with let chains
688   --> $DIR/disallowed-positions.rs:77:27
689    |
690 LL |     while (let 0 = 1) && (let 0 = 1) {}
691    |                           ^^^^^^^^^
692
693 error: `let` expressions are not supported here
694   --> $DIR/disallowed-positions.rs:83:38
695    |
696 LL |     while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
697    |                                      ^^^^^^^^^
698    |
699    = note: only supported directly in conditions of `if` and `while` expressions
700 note: `let`s wrapped in parentheses are not supported in a context with let chains
701   --> $DIR/disallowed-positions.rs:83:38
702    |
703 LL |     while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
704    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
705
706 error: `let` expressions are not supported here
707   --> $DIR/disallowed-positions.rs:83:51
708    |
709 LL |     while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
710    |                                                   ^^^^^^^^^
711    |
712    = note: only supported directly in conditions of `if` and `while` expressions
713 note: `let`s wrapped in parentheses are not supported in a context with let chains
714   --> $DIR/disallowed-positions.rs:83:38
715    |
716 LL |     while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
717    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
718
719 error: `let` expressions are not supported here
720   --> $DIR/disallowed-positions.rs:83:64
721    |
722 LL |     while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
723    |                                                                ^^^^^^^^^
724    |
725    = note: only supported directly in conditions of `if` and `while` expressions
726 note: `let`s wrapped in parentheses are not supported in a context with let chains
727   --> $DIR/disallowed-positions.rs:83:38
728    |
729 LL |     while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
730    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
731
732 error: `let` expressions are not supported here
733   --> $DIR/disallowed-positions.rs:99:16
734    |
735 LL |     use_expr!((let 0 = 1 && 0 == 0));
736    |                ^^^^^^^^^
737    |
738    = note: only supported directly in conditions of `if` and `while` expressions
739 note: `let`s wrapped in parentheses are not supported in a context with let chains
740   --> $DIR/disallowed-positions.rs:99:16
741    |
742 LL |     use_expr!((let 0 = 1 && 0 == 0));
743    |                ^^^^^^^^^^^^^^^^^^^
744
745 error: `let` expressions are not supported here
746   --> $DIR/disallowed-positions.rs:99:16
747    |
748 LL |     use_expr!((let 0 = 1 && 0 == 0));
749    |                ^^^^^^^^^
750    |
751    = note: only supported directly in conditions of `if` and `while` expressions
752 note: `let`s wrapped in parentheses are not supported in a context with let chains
753   --> $DIR/disallowed-positions.rs:99:16
754    |
755 LL |     use_expr!((let 0 = 1 && 0 == 0));
756    |                ^^^^^^^^^^^^^^^^^^^
757
758 error: `let` expressions are not supported here
759   --> $DIR/disallowed-positions.rs:103:16
760    |
761 LL |     use_expr!((let 0 = 1));
762    |                ^^^^^^^^^
763    |
764    = note: only supported directly in conditions of `if` and `while` expressions
765 note: `let`s wrapped in parentheses are not supported in a context with let chains
766   --> $DIR/disallowed-positions.rs:103:16
767    |
768 LL |     use_expr!((let 0 = 1));
769    |                ^^^^^^^^^
770
771 error: `let` expressions are not supported here
772   --> $DIR/disallowed-positions.rs:103:16
773    |
774 LL |     use_expr!((let 0 = 1));
775    |                ^^^^^^^^^
776    |
777    = note: only supported directly in conditions of `if` and `while` expressions
778 note: `let`s wrapped in parentheses are not supported in a context with let chains
779   --> $DIR/disallowed-positions.rs:103:16
780    |
781 LL |     use_expr!((let 0 = 1));
782    |                ^^^^^^^^^
783
784 error: `let` expressions are not supported here
785   --> $DIR/disallowed-positions.rs:110:9
786    |
787 LL |     if &let 0 = 0 {}
788    |         ^^^^^^^^^
789    |
790    = note: only supported directly in conditions of `if` and `while` expressions
791
792 error: `let` expressions are not supported here
793   --> $DIR/disallowed-positions.rs:115:9
794    |
795 LL |     if !let 0 = 0 {}
796    |         ^^^^^^^^^
797    |
798    = note: only supported directly in conditions of `if` and `while` expressions
799
800 error: `let` expressions are not supported here
801   --> $DIR/disallowed-positions.rs:118:9
802    |
803 LL |     if *let 0 = 0 {}
804    |         ^^^^^^^^^
805    |
806    = note: only supported directly in conditions of `if` and `while` expressions
807
808 error: `let` expressions are not supported here
809   --> $DIR/disallowed-positions.rs:122:9
810    |
811 LL |     if -let 0 = 0 {}
812    |         ^^^^^^^^^
813    |
814    = note: only supported directly in conditions of `if` and `while` expressions
815
816 error: `let` expressions are not supported here
817   --> $DIR/disallowed-positions.rs:132:9
818    |
819 LL |     if (let 0 = 0)? {}
820    |         ^^^^^^^^^
821    |
822    = note: only supported directly in conditions of `if` and `while` expressions
823 note: `let`s wrapped in parentheses are not supported in a context with let chains
824   --> $DIR/disallowed-positions.rs:132:9
825    |
826 LL |     if (let 0 = 0)? {}
827    |         ^^^^^^^^^
828
829 error: `let` expressions are not supported here
830   --> $DIR/disallowed-positions.rs:138:16
831    |
832 LL |     if true || let 0 = 0 {}
833    |                ^^^^^^^^^
834    |
835    = note: only supported directly in conditions of `if` and `while` expressions
836 note: `||` operators are not supported in let chain expressions
837   --> $DIR/disallowed-positions.rs:138:13
838    |
839 LL |     if true || let 0 = 0 {}
840    |             ^^
841
842 error: `let` expressions are not supported here
843   --> $DIR/disallowed-positions.rs:141:17
844    |
845 LL |     if (true || let 0 = 0) {}
846    |                 ^^^^^^^^^
847    |
848    = note: only supported directly in conditions of `if` and `while` expressions
849 note: `||` operators are not supported in let chain expressions
850   --> $DIR/disallowed-positions.rs:141:14
851    |
852 LL |     if (true || let 0 = 0) {}
853    |              ^^
854
855 error: `let` expressions are not supported here
856   --> $DIR/disallowed-positions.rs:144:25
857    |
858 LL |     if true && (true || let 0 = 0) {}
859    |                         ^^^^^^^^^
860    |
861    = note: only supported directly in conditions of `if` and `while` expressions
862 note: `||` operators are not supported in let chain expressions
863   --> $DIR/disallowed-positions.rs:144:22
864    |
865 LL |     if true && (true || let 0 = 0) {}
866    |                      ^^
867
868 error: `let` expressions are not supported here
869   --> $DIR/disallowed-positions.rs:147:25
870    |
871 LL |     if true || (true && let 0 = 0) {}
872    |                         ^^^^^^^^^
873    |
874    = note: only supported directly in conditions of `if` and `while` expressions
875 note: `let`s wrapped in parentheses are not supported in a context with let chains
876   --> $DIR/disallowed-positions.rs:147:17
877    |
878 LL |     if true || (true && let 0 = 0) {}
879    |                 ^^^^^^^^^^^^^^^^^
880
881 error: `let` expressions are not supported here
882   --> $DIR/disallowed-positions.rs:152:12
883    |
884 LL |     if x = let 0 = 0 {}
885    |            ^^^^^^^^^
886    |
887    = note: only supported directly in conditions of `if` and `while` expressions
888
889 error: `let` expressions are not supported here
890   --> $DIR/disallowed-positions.rs:157:15
891    |
892 LL |     if true..(let 0 = 0) {}
893    |               ^^^^^^^^^
894    |
895    = note: only supported directly in conditions of `if` and `while` expressions
896 note: `let`s wrapped in parentheses are not supported in a context with let chains
897   --> $DIR/disallowed-positions.rs:157:15
898    |
899 LL |     if true..(let 0 = 0) {}
900    |               ^^^^^^^^^
901
902 error: `let` expressions are not supported here
903   --> $DIR/disallowed-positions.rs:161:11
904    |
905 LL |     if ..(let 0 = 0) {}
906    |           ^^^^^^^^^
907    |
908    = note: only supported directly in conditions of `if` and `while` expressions
909 note: `let`s wrapped in parentheses are not supported in a context with let chains
910   --> $DIR/disallowed-positions.rs:161:11
911    |
912 LL |     if ..(let 0 = 0) {}
913    |           ^^^^^^^^^
914
915 error: `let` expressions are not supported here
916   --> $DIR/disallowed-positions.rs:165:9
917    |
918 LL |     if (let 0 = 0).. {}
919    |         ^^^^^^^^^
920    |
921    = note: only supported directly in conditions of `if` and `while` expressions
922 note: `let`s wrapped in parentheses are not supported in a context with let chains
923   --> $DIR/disallowed-positions.rs:165:9
924    |
925 LL |     if (let 0 = 0).. {}
926    |         ^^^^^^^^^
927
928 error: `let` expressions are not supported here
929   --> $DIR/disallowed-positions.rs:171:8
930    |
931 LL |     if let Range { start: _, end: _ } = true..true && false {}
932    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
933    |
934    = note: only supported directly in conditions of `if` and `while` expressions
935
936 error: `let` expressions are not supported here
937   --> $DIR/disallowed-positions.rs:175:8
938    |
939 LL |     if let Range { start: _, end: _ } = true..true || false {}
940    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
941    |
942    = note: only supported directly in conditions of `if` and `while` expressions
943
944 error: `let` expressions are not supported here
945   --> $DIR/disallowed-positions.rs:182:8
946    |
947 LL |     if let Range { start: F, end } = F..|| true {}
948    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
949    |
950    = note: only supported directly in conditions of `if` and `while` expressions
951
952 error: `let` expressions are not supported here
953   --> $DIR/disallowed-positions.rs:190:8
954    |
955 LL |     if let Range { start: true, end } = t..&&false {}
956    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
957    |
958    = note: only supported directly in conditions of `if` and `while` expressions
959
960 error: `let` expressions are not supported here
961   --> $DIR/disallowed-positions.rs:196:19
962    |
963 LL |     if let true = let true = true {}
964    |                   ^^^^^^^^^^^^^^^
965    |
966    = note: only supported directly in conditions of `if` and `while` expressions
967
968 error: `let` expressions are not supported here
969   --> $DIR/disallowed-positions.rs:202:12
970    |
971 LL |     while &let 0 = 0 {}
972    |            ^^^^^^^^^
973    |
974    = note: only supported directly in conditions of `if` and `while` expressions
975
976 error: `let` expressions are not supported here
977   --> $DIR/disallowed-positions.rs:207:12
978    |
979 LL |     while !let 0 = 0 {}
980    |            ^^^^^^^^^
981    |
982    = note: only supported directly in conditions of `if` and `while` expressions
983
984 error: `let` expressions are not supported here
985   --> $DIR/disallowed-positions.rs:210:12
986    |
987 LL |     while *let 0 = 0 {}
988    |            ^^^^^^^^^
989    |
990    = note: only supported directly in conditions of `if` and `while` expressions
991
992 error: `let` expressions are not supported here
993   --> $DIR/disallowed-positions.rs:214:12
994    |
995 LL |     while -let 0 = 0 {}
996    |            ^^^^^^^^^
997    |
998    = note: only supported directly in conditions of `if` and `while` expressions
999
1000 error: `let` expressions are not supported here
1001   --> $DIR/disallowed-positions.rs:224:12
1002    |
1003 LL |     while (let 0 = 0)? {}
1004    |            ^^^^^^^^^
1005    |
1006    = note: only supported directly in conditions of `if` and `while` expressions
1007 note: `let`s wrapped in parentheses are not supported in a context with let chains
1008   --> $DIR/disallowed-positions.rs:224:12
1009    |
1010 LL |     while (let 0 = 0)? {}
1011    |            ^^^^^^^^^
1012
1013 error: `let` expressions are not supported here
1014   --> $DIR/disallowed-positions.rs:230:19
1015    |
1016 LL |     while true || let 0 = 0 {}
1017    |                   ^^^^^^^^^
1018    |
1019    = note: only supported directly in conditions of `if` and `while` expressions
1020 note: `||` operators are not supported in let chain expressions
1021   --> $DIR/disallowed-positions.rs:230:16
1022    |
1023 LL |     while true || let 0 = 0 {}
1024    |                ^^
1025
1026 error: `let` expressions are not supported here
1027   --> $DIR/disallowed-positions.rs:233:20
1028    |
1029 LL |     while (true || let 0 = 0) {}
1030    |                    ^^^^^^^^^
1031    |
1032    = note: only supported directly in conditions of `if` and `while` expressions
1033 note: `||` operators are not supported in let chain expressions
1034   --> $DIR/disallowed-positions.rs:233:17
1035    |
1036 LL |     while (true || let 0 = 0) {}
1037    |                 ^^
1038
1039 error: `let` expressions are not supported here
1040   --> $DIR/disallowed-positions.rs:236:28
1041    |
1042 LL |     while true && (true || let 0 = 0) {}
1043    |                            ^^^^^^^^^
1044    |
1045    = note: only supported directly in conditions of `if` and `while` expressions
1046 note: `||` operators are not supported in let chain expressions
1047   --> $DIR/disallowed-positions.rs:236:25
1048    |
1049 LL |     while true && (true || let 0 = 0) {}
1050    |                         ^^
1051
1052 error: `let` expressions are not supported here
1053   --> $DIR/disallowed-positions.rs:239:28
1054    |
1055 LL |     while true || (true && let 0 = 0) {}
1056    |                            ^^^^^^^^^
1057    |
1058    = note: only supported directly in conditions of `if` and `while` expressions
1059 note: `let`s wrapped in parentheses are not supported in a context with let chains
1060   --> $DIR/disallowed-positions.rs:239:20
1061    |
1062 LL |     while true || (true && let 0 = 0) {}
1063    |                    ^^^^^^^^^^^^^^^^^
1064
1065 error: `let` expressions are not supported here
1066   --> $DIR/disallowed-positions.rs:244:15
1067    |
1068 LL |     while x = let 0 = 0 {}
1069    |               ^^^^^^^^^
1070    |
1071    = note: only supported directly in conditions of `if` and `while` expressions
1072
1073 error: `let` expressions are not supported here
1074   --> $DIR/disallowed-positions.rs:249:18
1075    |
1076 LL |     while true..(let 0 = 0) {}
1077    |                  ^^^^^^^^^
1078    |
1079    = note: only supported directly in conditions of `if` and `while` expressions
1080 note: `let`s wrapped in parentheses are not supported in a context with let chains
1081   --> $DIR/disallowed-positions.rs:249:18
1082    |
1083 LL |     while true..(let 0 = 0) {}
1084    |                  ^^^^^^^^^
1085
1086 error: `let` expressions are not supported here
1087   --> $DIR/disallowed-positions.rs:253:14
1088    |
1089 LL |     while ..(let 0 = 0) {}
1090    |              ^^^^^^^^^
1091    |
1092    = note: only supported directly in conditions of `if` and `while` expressions
1093 note: `let`s wrapped in parentheses are not supported in a context with let chains
1094   --> $DIR/disallowed-positions.rs:253:14
1095    |
1096 LL |     while ..(let 0 = 0) {}
1097    |              ^^^^^^^^^
1098
1099 error: `let` expressions are not supported here
1100   --> $DIR/disallowed-positions.rs:257:12
1101    |
1102 LL |     while (let 0 = 0).. {}
1103    |            ^^^^^^^^^
1104    |
1105    = note: only supported directly in conditions of `if` and `while` expressions
1106 note: `let`s wrapped in parentheses are not supported in a context with let chains
1107   --> $DIR/disallowed-positions.rs:257:12
1108    |
1109 LL |     while (let 0 = 0).. {}
1110    |            ^^^^^^^^^
1111
1112 error: `let` expressions are not supported here
1113   --> $DIR/disallowed-positions.rs:263:11
1114    |
1115 LL |     while let Range { start: _, end: _ } = true..true && false {}
1116    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1117    |
1118    = note: only supported directly in conditions of `if` and `while` expressions
1119
1120 error: `let` expressions are not supported here
1121   --> $DIR/disallowed-positions.rs:267:11
1122    |
1123 LL |     while let Range { start: _, end: _ } = true..true || false {}
1124    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1125    |
1126    = note: only supported directly in conditions of `if` and `while` expressions
1127
1128 error: `let` expressions are not supported here
1129   --> $DIR/disallowed-positions.rs:274:11
1130    |
1131 LL |     while let Range { start: F, end } = F..|| true {}
1132    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1133    |
1134    = note: only supported directly in conditions of `if` and `while` expressions
1135
1136 error: `let` expressions are not supported here
1137   --> $DIR/disallowed-positions.rs:282:11
1138    |
1139 LL |     while let Range { start: true, end } = t..&&false {}
1140    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1141    |
1142    = note: only supported directly in conditions of `if` and `while` expressions
1143
1144 error: `let` expressions are not supported here
1145   --> $DIR/disallowed-positions.rs:288:22
1146    |
1147 LL |     while let true = let true = true {}
1148    |                      ^^^^^^^^^^^^^^^
1149    |
1150    = note: only supported directly in conditions of `if` and `while` expressions
1151
1152 error: `let` expressions are not supported here
1153   --> $DIR/disallowed-positions.rs:304:6
1154    |
1155 LL |     &let 0 = 0;
1156    |      ^^^^^^^^^
1157    |
1158    = note: only supported directly in conditions of `if` and `while` expressions
1159
1160 error: `let` expressions are not supported here
1161   --> $DIR/disallowed-positions.rs:308:6
1162    |
1163 LL |     !let 0 = 0;
1164    |      ^^^^^^^^^
1165    |
1166    = note: only supported directly in conditions of `if` and `while` expressions
1167
1168 error: `let` expressions are not supported here
1169   --> $DIR/disallowed-positions.rs:311:6
1170    |
1171 LL |     *let 0 = 0;
1172    |      ^^^^^^^^^
1173    |
1174    = note: only supported directly in conditions of `if` and `while` expressions
1175
1176 error: `let` expressions are not supported here
1177   --> $DIR/disallowed-positions.rs:315:6
1178    |
1179 LL |     -let 0 = 0;
1180    |      ^^^^^^^^^
1181    |
1182    = note: only supported directly in conditions of `if` and `while` expressions
1183
1184 error: `let` expressions are not supported here
1185   --> $DIR/disallowed-positions.rs:325:6
1186    |
1187 LL |     (let 0 = 0)?;
1188    |      ^^^^^^^^^
1189    |
1190    = note: only supported directly in conditions of `if` and `while` expressions
1191 note: `let`s wrapped in parentheses are not supported in a context with let chains
1192   --> $DIR/disallowed-positions.rs:325:6
1193    |
1194 LL |     (let 0 = 0)?;
1195    |      ^^^^^^^^^
1196
1197 error: `let` expressions are not supported here
1198   --> $DIR/disallowed-positions.rs:331:13
1199    |
1200 LL |     true || let 0 = 0;
1201    |             ^^^^^^^^^
1202    |
1203    = note: only supported directly in conditions of `if` and `while` expressions
1204 note: `||` operators are not supported in let chain expressions
1205   --> $DIR/disallowed-positions.rs:331:10
1206    |
1207 LL |     true || let 0 = 0;
1208    |          ^^
1209
1210 error: `let` expressions are not supported here
1211   --> $DIR/disallowed-positions.rs:334:14
1212    |
1213 LL |     (true || let 0 = 0);
1214    |              ^^^^^^^^^
1215    |
1216    = note: only supported directly in conditions of `if` and `while` expressions
1217 note: `||` operators are not supported in let chain expressions
1218   --> $DIR/disallowed-positions.rs:334:11
1219    |
1220 LL |     (true || let 0 = 0);
1221    |           ^^
1222
1223 error: `let` expressions are not supported here
1224   --> $DIR/disallowed-positions.rs:337:22
1225    |
1226 LL |     true && (true || let 0 = 0);
1227    |                      ^^^^^^^^^
1228    |
1229    = note: only supported directly in conditions of `if` and `while` expressions
1230 note: `||` operators are not supported in let chain expressions
1231   --> $DIR/disallowed-positions.rs:337:19
1232    |
1233 LL |     true && (true || let 0 = 0);
1234    |                   ^^
1235
1236 error: `let` expressions are not supported here
1237   --> $DIR/disallowed-positions.rs:342:9
1238    |
1239 LL |     x = let 0 = 0;
1240    |         ^^^^^^^^^
1241    |
1242    = note: only supported directly in conditions of `if` and `while` expressions
1243
1244 error: `let` expressions are not supported here
1245   --> $DIR/disallowed-positions.rs:346:12
1246    |
1247 LL |     true..(let 0 = 0);
1248    |            ^^^^^^^^^
1249    |
1250    = note: only supported directly in conditions of `if` and `while` expressions
1251 note: `let`s wrapped in parentheses are not supported in a context with let chains
1252   --> $DIR/disallowed-positions.rs:346:12
1253    |
1254 LL |     true..(let 0 = 0);
1255    |            ^^^^^^^^^
1256
1257 error: `let` expressions are not supported here
1258   --> $DIR/disallowed-positions.rs:349:8
1259    |
1260 LL |     ..(let 0 = 0);
1261    |        ^^^^^^^^^
1262    |
1263    = note: only supported directly in conditions of `if` and `while` expressions
1264 note: `let`s wrapped in parentheses are not supported in a context with let chains
1265   --> $DIR/disallowed-positions.rs:349:8
1266    |
1267 LL |     ..(let 0 = 0);
1268    |        ^^^^^^^^^
1269
1270 error: `let` expressions are not supported here
1271   --> $DIR/disallowed-positions.rs:352:6
1272    |
1273 LL |     (let 0 = 0)..;
1274    |      ^^^^^^^^^
1275    |
1276    = note: only supported directly in conditions of `if` and `while` expressions
1277 note: `let`s wrapped in parentheses are not supported in a context with let chains
1278   --> $DIR/disallowed-positions.rs:352:6
1279    |
1280 LL |     (let 0 = 0)..;
1281    |      ^^^^^^^^^
1282
1283 error: `let` expressions are not supported here
1284   --> $DIR/disallowed-positions.rs:356:6
1285    |
1286 LL |     (let Range { start: _, end: _ } = true..true || false);
1287    |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1288    |
1289    = note: only supported directly in conditions of `if` and `while` expressions
1290
1291 error: `let` expressions are not supported here
1292   --> $DIR/disallowed-positions.rs:361:6
1293    |
1294 LL |     (let true = let true = true);
1295    |      ^^^^^^^^^^^^^^^^^^^^^^^^^^
1296    |
1297    = note: only supported directly in conditions of `if` and `while` expressions
1298 note: `let`s wrapped in parentheses are not supported in a context with let chains
1299   --> $DIR/disallowed-positions.rs:361:6
1300    |
1301 LL |     (let true = let true = true);
1302    |      ^^^^^^^^^^^^^^^^^^^^^^^^^^
1303
1304 error: `let` expressions are not supported here
1305   --> $DIR/disallowed-positions.rs:379:6
1306    |
1307 LL |     &let 0 = 0
1308    |      ^^^^^^^^^
1309    |
1310    = note: only supported directly in conditions of `if` and `while` expressions
1311
1312 error: `let` expressions are not supported here
1313   --> $DIR/disallowed-positions.rs:391:17
1314    |
1315 LL |         true && let 1 = 1
1316    |                 ^^^^^^^^^
1317    |
1318    = note: only supported directly in conditions of `if` and `while` expressions
1319
1320 error: `let` expressions are not supported here
1321   --> $DIR/disallowed-positions.rs:397:17
1322    |
1323 LL |         true && let 1 = 1
1324    |                 ^^^^^^^^^
1325    |
1326    = note: only supported directly in conditions of `if` and `while` expressions
1327
1328 error: `let` expressions are not supported here
1329   --> $DIR/disallowed-positions.rs:403:17
1330    |
1331 LL |         true && let 1 = 1
1332    |                 ^^^^^^^^^
1333    |
1334    = note: only supported directly in conditions of `if` and `while` expressions
1335
1336 error: `let` expressions are not supported here
1337   --> $DIR/disallowed-positions.rs:415:17
1338    |
1339 LL |         true && let 1 = 1
1340    |                 ^^^^^^^^^
1341    |
1342    = note: only supported directly in conditions of `if` and `while` expressions
1343
1344 error: `let` expressions are not supported here
1345   --> $DIR/disallowed-positions.rs:425:9
1346    |
1347 LL |     if (let Some(a) = opt && true) {
1348    |         ^^^^^^^^^^^^^^^^^
1349    |
1350    = note: only supported directly in conditions of `if` and `while` expressions
1351 note: `let`s wrapped in parentheses are not supported in a context with let chains
1352   --> $DIR/disallowed-positions.rs:425:9
1353    |
1354 LL |     if (let Some(a) = opt && true) {
1355    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
1356
1357 error: `let` expressions are not supported here
1358   --> $DIR/disallowed-positions.rs:430:9
1359    |
1360 LL |     if (let Some(a) = opt) && true {
1361    |         ^^^^^^^^^^^^^^^^^
1362    |
1363    = note: only supported directly in conditions of `if` and `while` expressions
1364 note: `let`s wrapped in parentheses are not supported in a context with let chains
1365   --> $DIR/disallowed-positions.rs:430:9
1366    |
1367 LL |     if (let Some(a) = opt) && true {
1368    |         ^^^^^^^^^^^^^^^^^
1369
1370 error: `let` expressions are not supported here
1371   --> $DIR/disallowed-positions.rs:434:9
1372    |
1373 LL |     if (let Some(a) = opt) && (let Some(b) = a) {
1374    |         ^^^^^^^^^^^^^^^^^
1375    |
1376    = note: only supported directly in conditions of `if` and `while` expressions
1377 note: `let`s wrapped in parentheses are not supported in a context with let chains
1378   --> $DIR/disallowed-positions.rs:434:9
1379    |
1380 LL |     if (let Some(a) = opt) && (let Some(b) = a) {
1381    |         ^^^^^^^^^^^^^^^^^
1382
1383 error: `let` expressions are not supported here
1384   --> $DIR/disallowed-positions.rs:434:32
1385    |
1386 LL |     if (let Some(a) = opt) && (let Some(b) = a) {
1387    |                                ^^^^^^^^^^^^^^^
1388    |
1389    = note: only supported directly in conditions of `if` and `while` expressions
1390 note: `let`s wrapped in parentheses are not supported in a context with let chains
1391   --> $DIR/disallowed-positions.rs:434:32
1392    |
1393 LL |     if (let Some(a) = opt) && (let Some(b) = a) {
1394    |                                ^^^^^^^^^^^^^^^
1395
1396 error: `let` expressions are not supported here
1397   --> $DIR/disallowed-positions.rs:443:9
1398    |
1399 LL |     if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
1400    |         ^^^^^^^^^^^^^^^^^
1401    |
1402    = note: only supported directly in conditions of `if` and `while` expressions
1403 note: `let`s wrapped in parentheses are not supported in a context with let chains
1404   --> $DIR/disallowed-positions.rs:443:9
1405    |
1406 LL |     if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
1407    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1408
1409 error: `let` expressions are not supported here
1410   --> $DIR/disallowed-positions.rs:443:31
1411    |
1412 LL |     if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
1413    |                               ^^^^^^^^^^^^^^^
1414    |
1415    = note: only supported directly in conditions of `if` and `while` expressions
1416 note: `let`s wrapped in parentheses are not supported in a context with let chains
1417   --> $DIR/disallowed-positions.rs:443:31
1418    |
1419 LL |     if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
1420    |                               ^^^^^^^^^^^^^^^
1421
1422 error: `let` expressions are not supported here
1423   --> $DIR/disallowed-positions.rs:449:9
1424    |
1425 LL |     if (let Some(a) = opt && (let Some(b) = a)) && true {
1426    |         ^^^^^^^^^^^^^^^^^
1427    |
1428    = note: only supported directly in conditions of `if` and `while` expressions
1429 note: `let`s wrapped in parentheses are not supported in a context with let chains
1430   --> $DIR/disallowed-positions.rs:449:9
1431    |
1432 LL |     if (let Some(a) = opt && (let Some(b) = a)) && true {
1433    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1434
1435 error: `let` expressions are not supported here
1436   --> $DIR/disallowed-positions.rs:449:31
1437    |
1438 LL |     if (let Some(a) = opt && (let Some(b) = a)) && true {
1439    |                               ^^^^^^^^^^^^^^^
1440    |
1441    = note: only supported directly in conditions of `if` and `while` expressions
1442 note: `let`s wrapped in parentheses are not supported in a context with let chains
1443   --> $DIR/disallowed-positions.rs:449:31
1444    |
1445 LL |     if (let Some(a) = opt && (let Some(b) = a)) && true {
1446    |                               ^^^^^^^^^^^^^^^
1447
1448 error: `let` expressions are not supported here
1449   --> $DIR/disallowed-positions.rs:455:9
1450    |
1451 LL |     if (let Some(a) = opt && (true)) && true {
1452    |         ^^^^^^^^^^^^^^^^^
1453    |
1454    = note: only supported directly in conditions of `if` and `while` expressions
1455 note: `let`s wrapped in parentheses are not supported in a context with let chains
1456   --> $DIR/disallowed-positions.rs:455:9
1457    |
1458 LL |     if (let Some(a) = opt && (true)) && true {
1459    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1460
1461 error[E0308]: mismatched types
1462   --> $DIR/disallowed-positions.rs:110:8
1463    |
1464 LL |     if &let 0 = 0 {}
1465    |        ^^^^^^^^^^ expected `bool`, found `&bool`
1466    |
1467 help: consider removing the borrow
1468    |
1469 LL -     if &let 0 = 0 {}
1470 LL +     if let 0 = 0 {}
1471    |
1472
1473 error[E0614]: type `bool` cannot be dereferenced
1474   --> $DIR/disallowed-positions.rs:118:8
1475    |
1476 LL |     if *let 0 = 0 {}
1477    |        ^^^^^^^^^^
1478
1479 error[E0600]: cannot apply unary operator `-` to type `bool`
1480   --> $DIR/disallowed-positions.rs:122:8
1481    |
1482 LL |     if -let 0 = 0 {}
1483    |        ^^^^^^^^^^ cannot apply unary operator `-`
1484
1485 error[E0277]: the `?` operator can only be applied to values that implement `Try`
1486   --> $DIR/disallowed-positions.rs:132:8
1487    |
1488 LL |     if (let 0 = 0)? {}
1489    |        ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool`
1490    |
1491    = help: the trait `Try` is not implemented for `bool`
1492
1493 error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
1494   --> $DIR/disallowed-positions.rs:132:19
1495    |
1496 LL | / fn nested_within_if_expr() {
1497 LL | |     if &let 0 = 0 {}
1498 LL | |
1499 LL | |
1500 ...  |
1501 LL | |     if (let 0 = 0)? {}
1502    | |                   ^ cannot use the `?` operator in a function that returns `()`
1503 ...  |
1504 LL | |
1505 LL | | }
1506    | |_- this function should return `Result` or `Option` to accept `?`
1507    |
1508    = help: the trait `FromResidual<_>` is not implemented for `()`
1509
1510 error[E0308]: mismatched types
1511   --> $DIR/disallowed-positions.rs:152:8
1512    |
1513 LL |     if x = let 0 = 0 {}
1514    |        ^^^^^^^^^^^^^ expected `bool`, found `()`
1515    |
1516 help: you might have meant to compare for equality
1517    |
1518 LL |     if x == let 0 = 0 {}
1519    |          ~~
1520
1521 error[E0308]: mismatched types
1522   --> $DIR/disallowed-positions.rs:157:8
1523    |
1524 LL |     if true..(let 0 = 0) {}
1525    |        ^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
1526    |
1527    = note: expected type `bool`
1528             found struct `std::ops::Range<bool>`
1529
1530 error[E0308]: mismatched types
1531   --> $DIR/disallowed-positions.rs:161:8
1532    |
1533 LL |     if ..(let 0 = 0) {}
1534    |        ^^^^^^^^^^^^^ expected `bool`, found struct `RangeTo`
1535    |
1536    = note: expected type `bool`
1537             found struct `RangeTo<bool>`
1538
1539 error[E0308]: mismatched types
1540   --> $DIR/disallowed-positions.rs:165:8
1541    |
1542 LL |     if (let 0 = 0).. {}
1543    |        ^^^^^^^^^^^^^ expected `bool`, found struct `RangeFrom`
1544    |
1545    = note: expected type `bool`
1546             found struct `RangeFrom<bool>`
1547
1548 error[E0308]: mismatched types
1549   --> $DIR/disallowed-positions.rs:171:12
1550    |
1551 LL |     if let Range { start: _, end: _ } = true..true && false {}
1552    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
1553    |            |
1554    |            expected `bool`, found struct `std::ops::Range`
1555    |
1556    = note: expected type `bool`
1557             found struct `std::ops::Range<_>`
1558
1559 error[E0308]: mismatched types
1560   --> $DIR/disallowed-positions.rs:171:8
1561    |
1562 LL |     if let Range { start: _, end: _ } = true..true && false {}
1563    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
1564    |
1565    = note: expected type `bool`
1566             found struct `std::ops::Range<bool>`
1567
1568 error[E0308]: mismatched types
1569   --> $DIR/disallowed-positions.rs:175:12
1570    |
1571 LL |     if let Range { start: _, end: _ } = true..true || false {}
1572    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
1573    |            |
1574    |            expected `bool`, found struct `std::ops::Range`
1575    |
1576    = note: expected type `bool`
1577             found struct `std::ops::Range<_>`
1578
1579 error[E0308]: mismatched types
1580   --> $DIR/disallowed-positions.rs:175:8
1581    |
1582 LL |     if let Range { start: _, end: _ } = true..true || false {}
1583    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
1584    |
1585    = note: expected type `bool`
1586             found struct `std::ops::Range<bool>`
1587
1588 error[E0308]: mismatched types
1589   --> $DIR/disallowed-positions.rs:182:12
1590    |
1591 LL |     if let Range { start: F, end } = F..|| true {}
1592    |            ^^^^^^^^^^^^^^^^^^^^^^^   - this expression has type `fn() -> bool`
1593    |            |
1594    |            expected fn pointer, found struct `std::ops::Range`
1595    |
1596    = note: expected fn pointer `fn() -> bool`
1597                   found struct `std::ops::Range<_>`
1598
1599 error[E0308]: mismatched types
1600   --> $DIR/disallowed-positions.rs:182:41
1601    |
1602 LL |     if let Range { start: F, end } = F..|| true {}
1603    |                                         ^^^^^^^ expected `bool`, found closure
1604    |
1605    = note: expected type `bool`
1606            found closure `[closure@$DIR/disallowed-positions.rs:182:41: 182:43]`
1607 help: use parentheses to call this closure
1608    |
1609 LL |     if let Range { start: F, end } = F..(|| true)() {}
1610    |                                         +       +++
1611
1612 error[E0308]: mismatched types
1613   --> $DIR/disallowed-positions.rs:182:8
1614    |
1615 LL |     if let Range { start: F, end } = F..|| true {}
1616    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
1617    |
1618    = note: expected type `bool`
1619             found struct `std::ops::Range<bool>`
1620
1621 error[E0308]: mismatched types
1622   --> $DIR/disallowed-positions.rs:190:12
1623    |
1624 LL |     if let Range { start: true, end } = t..&&false {}
1625    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   - this expression has type `&&bool`
1626    |            |
1627    |            expected `bool`, found struct `std::ops::Range`
1628    |
1629    = note: expected type `bool`
1630             found struct `std::ops::Range<_>`
1631
1632 error[E0308]: mismatched types
1633   --> $DIR/disallowed-positions.rs:190:44
1634    |
1635 LL |     if let Range { start: true, end } = t..&&false {}
1636    |                                            ^^^^^^^ expected `bool`, found `&&bool`
1637    |
1638 help: consider removing the `&&`
1639    |
1640 LL -     if let Range { start: true, end } = t..&&false {}
1641 LL +     if let Range { start: true, end } = t..false {}
1642    |
1643
1644 error[E0308]: mismatched types
1645   --> $DIR/disallowed-positions.rs:190:8
1646    |
1647 LL |     if let Range { start: true, end } = t..&&false {}
1648    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
1649    |
1650    = note: expected type `bool`
1651             found struct `std::ops::Range<bool>`
1652
1653 error[E0277]: the `?` operator can only be applied to values that implement `Try`
1654   --> $DIR/disallowed-positions.rs:128:20
1655    |
1656 LL |         if let 0 = 0? {}
1657    |                    ^^ the `?` operator cannot be applied to type `{integer}`
1658    |
1659    = help: the trait `Try` is not implemented for `{integer}`
1660
1661 error[E0308]: mismatched types
1662   --> $DIR/disallowed-positions.rs:202:11
1663    |
1664 LL |     while &let 0 = 0 {}
1665    |           ^^^^^^^^^^ expected `bool`, found `&bool`
1666    |
1667 help: consider removing the borrow
1668    |
1669 LL -     while &let 0 = 0 {}
1670 LL +     while let 0 = 0 {}
1671    |
1672
1673 error[E0614]: type `bool` cannot be dereferenced
1674   --> $DIR/disallowed-positions.rs:210:11
1675    |
1676 LL |     while *let 0 = 0 {}
1677    |           ^^^^^^^^^^
1678
1679 error[E0600]: cannot apply unary operator `-` to type `bool`
1680   --> $DIR/disallowed-positions.rs:214:11
1681    |
1682 LL |     while -let 0 = 0 {}
1683    |           ^^^^^^^^^^ cannot apply unary operator `-`
1684
1685 error[E0277]: the `?` operator can only be applied to values that implement `Try`
1686   --> $DIR/disallowed-positions.rs:224:11
1687    |
1688 LL |     while (let 0 = 0)? {}
1689    |           ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool`
1690    |
1691    = help: the trait `Try` is not implemented for `bool`
1692
1693 error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
1694   --> $DIR/disallowed-positions.rs:224:22
1695    |
1696 LL | / fn nested_within_while_expr() {
1697 LL | |     while &let 0 = 0 {}
1698 LL | |
1699 LL | |
1700 ...  |
1701 LL | |     while (let 0 = 0)? {}
1702    | |                      ^ cannot use the `?` operator in a function that returns `()`
1703 ...  |
1704 LL | |
1705 LL | | }
1706    | |_- this function should return `Result` or `Option` to accept `?`
1707    |
1708    = help: the trait `FromResidual<_>` is not implemented for `()`
1709
1710 error[E0308]: mismatched types
1711   --> $DIR/disallowed-positions.rs:244:11
1712    |
1713 LL |     while x = let 0 = 0 {}
1714    |           ^^^^^^^^^^^^^ expected `bool`, found `()`
1715    |
1716 help: you might have meant to compare for equality
1717    |
1718 LL |     while x == let 0 = 0 {}
1719    |             ~~
1720
1721 error[E0308]: mismatched types
1722   --> $DIR/disallowed-positions.rs:249:11
1723    |
1724 LL |     while true..(let 0 = 0) {}
1725    |           ^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
1726    |
1727    = note: expected type `bool`
1728             found struct `std::ops::Range<bool>`
1729
1730 error[E0308]: mismatched types
1731   --> $DIR/disallowed-positions.rs:253:11
1732    |
1733 LL |     while ..(let 0 = 0) {}
1734    |           ^^^^^^^^^^^^^ expected `bool`, found struct `RangeTo`
1735    |
1736    = note: expected type `bool`
1737             found struct `RangeTo<bool>`
1738
1739 error[E0308]: mismatched types
1740   --> $DIR/disallowed-positions.rs:257:11
1741    |
1742 LL |     while (let 0 = 0).. {}
1743    |           ^^^^^^^^^^^^^ expected `bool`, found struct `RangeFrom`
1744    |
1745    = note: expected type `bool`
1746             found struct `RangeFrom<bool>`
1747
1748 error[E0308]: mismatched types
1749   --> $DIR/disallowed-positions.rs:263:15
1750    |
1751 LL |     while let Range { start: _, end: _ } = true..true && false {}
1752    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
1753    |               |
1754    |               expected `bool`, found struct `std::ops::Range`
1755    |
1756    = note: expected type `bool`
1757             found struct `std::ops::Range<_>`
1758
1759 error[E0308]: mismatched types
1760   --> $DIR/disallowed-positions.rs:263:11
1761    |
1762 LL |     while let Range { start: _, end: _ } = true..true && false {}
1763    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
1764    |
1765    = note: expected type `bool`
1766             found struct `std::ops::Range<bool>`
1767
1768 error[E0308]: mismatched types
1769   --> $DIR/disallowed-positions.rs:267:15
1770    |
1771 LL |     while let Range { start: _, end: _ } = true..true || false {}
1772    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
1773    |               |
1774    |               expected `bool`, found struct `std::ops::Range`
1775    |
1776    = note: expected type `bool`
1777             found struct `std::ops::Range<_>`
1778
1779 error[E0308]: mismatched types
1780   --> $DIR/disallowed-positions.rs:267:11
1781    |
1782 LL |     while let Range { start: _, end: _ } = true..true || false {}
1783    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
1784    |
1785    = note: expected type `bool`
1786             found struct `std::ops::Range<bool>`
1787
1788 error[E0308]: mismatched types
1789   --> $DIR/disallowed-positions.rs:274:15
1790    |
1791 LL |     while let Range { start: F, end } = F..|| true {}
1792    |               ^^^^^^^^^^^^^^^^^^^^^^^   - this expression has type `fn() -> bool`
1793    |               |
1794    |               expected fn pointer, found struct `std::ops::Range`
1795    |
1796    = note: expected fn pointer `fn() -> bool`
1797                   found struct `std::ops::Range<_>`
1798
1799 error[E0308]: mismatched types
1800   --> $DIR/disallowed-positions.rs:274:44
1801    |
1802 LL |     while let Range { start: F, end } = F..|| true {}
1803    |                                            ^^^^^^^ expected `bool`, found closure
1804    |
1805    = note: expected type `bool`
1806            found closure `[closure@$DIR/disallowed-positions.rs:274:44: 274:46]`
1807 help: use parentheses to call this closure
1808    |
1809 LL |     while let Range { start: F, end } = F..(|| true)() {}
1810    |                                            +       +++
1811
1812 error[E0308]: mismatched types
1813   --> $DIR/disallowed-positions.rs:274:11
1814    |
1815 LL |     while let Range { start: F, end } = F..|| true {}
1816    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
1817    |
1818    = note: expected type `bool`
1819             found struct `std::ops::Range<bool>`
1820
1821 error[E0308]: mismatched types
1822   --> $DIR/disallowed-positions.rs:282:15
1823    |
1824 LL |     while let Range { start: true, end } = t..&&false {}
1825    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   - this expression has type `&&bool`
1826    |               |
1827    |               expected `bool`, found struct `std::ops::Range`
1828    |
1829    = note: expected type `bool`
1830             found struct `std::ops::Range<_>`
1831
1832 error[E0308]: mismatched types
1833   --> $DIR/disallowed-positions.rs:282:47
1834    |
1835 LL |     while let Range { start: true, end } = t..&&false {}
1836    |                                               ^^^^^^^ expected `bool`, found `&&bool`
1837    |
1838 help: consider removing the `&&`
1839    |
1840 LL -     while let Range { start: true, end } = t..&&false {}
1841 LL +     while let Range { start: true, end } = t..false {}
1842    |
1843
1844 error[E0308]: mismatched types
1845   --> $DIR/disallowed-positions.rs:282:11
1846    |
1847 LL |     while let Range { start: true, end } = t..&&false {}
1848    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
1849    |
1850    = note: expected type `bool`
1851             found struct `std::ops::Range<bool>`
1852
1853 error[E0277]: the `?` operator can only be applied to values that implement `Try`
1854   --> $DIR/disallowed-positions.rs:220:23
1855    |
1856 LL |         while let 0 = 0? {}
1857    |                       ^^ the `?` operator cannot be applied to type `{integer}`
1858    |
1859    = help: the trait `Try` is not implemented for `{integer}`
1860
1861 error[E0614]: type `bool` cannot be dereferenced
1862   --> $DIR/disallowed-positions.rs:311:5
1863    |
1864 LL |     *let 0 = 0;
1865    |     ^^^^^^^^^^
1866
1867 error[E0600]: cannot apply unary operator `-` to type `bool`
1868   --> $DIR/disallowed-positions.rs:315:5
1869    |
1870 LL |     -let 0 = 0;
1871    |     ^^^^^^^^^^ cannot apply unary operator `-`
1872
1873 error[E0277]: the `?` operator can only be applied to values that implement `Try`
1874   --> $DIR/disallowed-positions.rs:325:5
1875    |
1876 LL |     (let 0 = 0)?;
1877    |     ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool`
1878    |
1879    = help: the trait `Try` is not implemented for `bool`
1880
1881 error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
1882   --> $DIR/disallowed-positions.rs:325:16
1883    |
1884 LL | / fn outside_if_and_while_expr() {
1885 LL | |     &let 0 = 0;
1886 LL | |
1887 LL | |
1888 ...  |
1889 LL | |     (let 0 = 0)?;
1890    | |                ^ cannot use the `?` operator in a function that returns `()`
1891 ...  |
1892 LL | |
1893 LL | | }
1894    | |_- this function should return `Result` or `Option` to accept `?`
1895    |
1896    = help: the trait `FromResidual<_>` is not implemented for `()`
1897
1898 error[E0308]: mismatched types
1899   --> $DIR/disallowed-positions.rs:356:10
1900    |
1901 LL |     (let Range { start: _, end: _ } = true..true || false);
1902    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
1903    |          |
1904    |          expected `bool`, found struct `std::ops::Range`
1905    |
1906    = note: expected type `bool`
1907             found struct `std::ops::Range<_>`
1908
1909 error[E0308]: mismatched types
1910   --> $DIR/disallowed-positions.rs:379:5
1911    |
1912 LL | fn outside_if_and_while_expr() {
1913    |                                - help: try adding a return type: `-> &bool`
1914 ...
1915 LL |     &let 0 = 0
1916    |     ^^^^^^^^^^ expected `()`, found `&bool`
1917
1918 error[E0277]: the `?` operator can only be applied to values that implement `Try`
1919   --> $DIR/disallowed-positions.rs:321:17
1920    |
1921 LL |         let 0 = 0?;
1922    |                 ^^ the `?` operator cannot be applied to type `{integer}`
1923    |
1924    = help: the trait `Try` is not implemented for `{integer}`
1925
1926 error: aborting due to 215 previous errors
1927
1928 Some errors have detailed explanations: E0277, E0308, E0600, E0614.
1929 For more information about an error, try `rustc --explain E0277`.