fork/rust

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

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

1.39.0
34.6 KiB989 linesraw
1error: expected one of `,` or `>`, found `&&`
2  --> $DIR/disallowed-positions.rs:242:14
3   |
4LL |         true && let 1 = 1
5   |              ^^ expected one of `,` or `>` here
6
7error: `let` expressions are not supported here
8  --> $DIR/disallowed-positions.rs:32:9
9   |
10LL |     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
16error: `let` expressions are not supported here
17  --> $DIR/disallowed-positions.rs:35:9
18   |
19LL |     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
25error: `let` expressions are not supported here
26  --> $DIR/disallowed-positions.rs:36:9
27   |
28LL |     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
34error: `let` expressions are not supported here
35  --> $DIR/disallowed-positions.rs:38:9
36   |
37LL |     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
43error: `let` expressions are not supported here
44  --> $DIR/disallowed-positions.rs:46:9
45   |
46LL |     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
52error: `let` expressions are not supported here
53  --> $DIR/disallowed-positions.rs:50:16
54   |
55LL |     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
61error: `let` expressions are not supported here
62  --> $DIR/disallowed-positions.rs:51:17
63   |
64LL |     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
70error: `let` expressions are not supported here
71  --> $DIR/disallowed-positions.rs:52:25
72   |
73LL |     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
79error: `let` expressions are not supported here
80  --> $DIR/disallowed-positions.rs:53:25
81   |
82LL |     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
88error: `let` expressions are not supported here
89  --> $DIR/disallowed-positions.rs:56:12
90   |
91LL |     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
97error: `let` expressions are not supported here
98  --> $DIR/disallowed-positions.rs:59:15
99   |
100LL |     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
106error: `let` expressions are not supported here
107  --> $DIR/disallowed-positions.rs:61:11
108   |
109LL |     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
115error: `let` expressions are not supported here
116  --> $DIR/disallowed-positions.rs:63:9
117   |
118LL |     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
124error: `let` expressions are not supported here
125  --> $DIR/disallowed-positions.rs:67:8
126   |
127LL |     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
133error: `let` expressions are not supported here
134  --> $DIR/disallowed-positions.rs:71:8
135   |
136LL |     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
142error: `let` expressions are not supported here
143  --> $DIR/disallowed-positions.rs:78:8
144   |
145LL |     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
151error: `let` expressions are not supported here
152  --> $DIR/disallowed-positions.rs:86:8
153   |
154LL |     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
160error: `let` expressions are not supported here
161  --> $DIR/disallowed-positions.rs:92:19
162   |
163LL |     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
169error: `let` expressions are not supported here
170  --> $DIR/disallowed-positions.rs:96:12
171   |
172LL |     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
178error: `let` expressions are not supported here
179  --> $DIR/disallowed-positions.rs:99:12
180   |
181LL |     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
187error: `let` expressions are not supported here
188  --> $DIR/disallowed-positions.rs:100:12
189   |
190LL |     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
196error: `let` expressions are not supported here
197  --> $DIR/disallowed-positions.rs:102:12
198   |
199LL |     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
205error: `let` expressions are not supported here
206  --> $DIR/disallowed-positions.rs:110:12
207   |
208LL |     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
214error: `let` expressions are not supported here
215  --> $DIR/disallowed-positions.rs:114:19
216   |
217LL |     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
223error: `let` expressions are not supported here
224  --> $DIR/disallowed-positions.rs:115:20
225   |
226LL |     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
232error: `let` expressions are not supported here
233  --> $DIR/disallowed-positions.rs:116:28
234   |
235LL |     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
241error: `let` expressions are not supported here
242  --> $DIR/disallowed-positions.rs:117:28
243   |
244LL |     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
250error: `let` expressions are not supported here
251  --> $DIR/disallowed-positions.rs:120:15
252   |
253LL |     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
259error: `let` expressions are not supported here
260  --> $DIR/disallowed-positions.rs:123:18
261   |
262LL |     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
268error: `let` expressions are not supported here
269  --> $DIR/disallowed-positions.rs:125:14
270   |
271LL |     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
277error: `let` expressions are not supported here
278  --> $DIR/disallowed-positions.rs:127:12
279   |
280LL |     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
286error: `let` expressions are not supported here
287  --> $DIR/disallowed-positions.rs:131:11
288   |
289LL |     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
295error: `let` expressions are not supported here
296  --> $DIR/disallowed-positions.rs:135:11
297   |
298LL |     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
304error: `let` expressions are not supported here
305  --> $DIR/disallowed-positions.rs:142:11
306   |
307LL |     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
313error: `let` expressions are not supported here
314  --> $DIR/disallowed-positions.rs:150:11
315   |
316LL |     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
322error: `let` expressions are not supported here
323  --> $DIR/disallowed-positions.rs:156:22
324   |
325LL |     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
331error: `let` expressions are not supported here
332  --> $DIR/disallowed-positions.rs:170:6
333   |
334LL |     &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
340error: `let` expressions are not supported here
341  --> $DIR/disallowed-positions.rs:172:6
342   |
343LL |     !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
349error: `let` expressions are not supported here
350  --> $DIR/disallowed-positions.rs:173:6
351   |
352LL |     *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
358error: `let` expressions are not supported here
359  --> $DIR/disallowed-positions.rs:175:6
360   |
361LL |     -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
367error: `let` expressions are not supported here
368  --> $DIR/disallowed-positions.rs:183:6
369   |
370LL |     (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
376error: `let` expressions are not supported here
377  --> $DIR/disallowed-positions.rs:187:13
378   |
379LL |     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
385error: `let` expressions are not supported here
386  --> $DIR/disallowed-positions.rs:188:14
387   |
388LL |     (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
394error: `let` expressions are not supported here
395  --> $DIR/disallowed-positions.rs:189:22
396   |
397LL |     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
403error: `let` expressions are not supported here
404  --> $DIR/disallowed-positions.rs:192:9
405   |
406LL |     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
412error: `let` expressions are not supported here
413  --> $DIR/disallowed-positions.rs:194:12
414   |
415LL |     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
421error: `let` expressions are not supported here
422  --> $DIR/disallowed-positions.rs:195:8
423   |
424LL |     ..(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
430error: `let` expressions are not supported here
431  --> $DIR/disallowed-positions.rs:196:6
432   |
433LL |     (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
439error: `let` expressions are not supported here
440  --> $DIR/disallowed-positions.rs:198:6
441   |
442LL |     (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
448error: `let` expressions are not supported here
449  --> $DIR/disallowed-positions.rs:202:6
450   |
451LL |     (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
457error: `let` expressions are not supported here
458  --> $DIR/disallowed-positions.rs:202:17
459   |
460LL |     (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
466error: `let` expressions are not supported here
467  --> $DIR/disallowed-positions.rs:207:6
468   |
469LL |     &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
475error: `let` expressions are not supported here
476  --> $DIR/disallowed-positions.rs:218:17
477   |
478LL |         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
484error: `let` expressions are not supported here
485  --> $DIR/disallowed-positions.rs:224:17
486   |
487LL |         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
493error: `let` expressions are not supported here
494  --> $DIR/disallowed-positions.rs:230:17
495   |
496LL |         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
502warning: the feature `const_generics` is incomplete and may cause the compiler to crash
503  --> $DIR/disallowed-positions.rs:20:12
504   |
505LL | #![feature(const_generics)]
506   |            ^^^^^^^^^^^^^^
507   |
508   = note: `#[warn(incomplete_features)]` on by default
509
510warning: the feature `let_chains` is incomplete and may cause the compiler to crash
511  --> $DIR/disallowed-positions.rs:22:12
512   |
513LL | #![feature(let_chains)] // Avoid inflating `.stderr` with overzealous gates in this test.
514   |            ^^^^^^^^^^
515
516error[E0308]: mismatched types
517  --> $DIR/disallowed-positions.rs:32:8
518   |
519LL |     if &let 0 = 0 {}
520   |        ^^^^^^^^^^ expected bool, found &bool
521   |
522   = note: expected type `bool`
523              found type `&bool`
524
525error[E0614]: type `bool` cannot be dereferenced
526  --> $DIR/disallowed-positions.rs:36:8
527   |
528LL |     if *let 0 = 0 {}
529   |        ^^^^^^^^^^
530
531error[E0600]: cannot apply unary operator `-` to type `bool`
532  --> $DIR/disallowed-positions.rs:38:8
533   |
534LL |     if -let 0 = 0 {}
535   |        ^^^^^^^^^^ cannot apply unary operator `-`
536   |
537   = note: an implementation of `std::ops::Neg` might be missing for `bool`
538
539error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
540  --> $DIR/disallowed-positions.rs:46:8
541   |
542LL |     if (let 0 = 0)? {}
543   |        ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool`
544   |
545   = help: the trait `std::ops::Try` is not implemented for `bool`
546   = note: required by `std::ops::Try::into_result`
547
548error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`)
549  --> $DIR/disallowed-positions.rs:46:8
550   |
551LL |     if (let 0 = 0)? {}
552   |        ^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()`
553   |
554   = help: the trait `std::ops::Try` is not implemented for `()`
555   = note: required by `std::ops::Try::from_error`
556
557error[E0308]: mismatched types
558  --> $DIR/disallowed-positions.rs:56:8
559   |
560LL |     if x = let 0 = 0 {}
561   |        ^^^^^^^^^^^^^
562   |        |
563   |        expected bool, found ()
564   |        help: try comparing for equality: `x == let 0 = 0`
565   |
566   = note: expected type `bool`
567              found type `()`
568
569error[E0308]: mismatched types
570  --> $DIR/disallowed-positions.rs:59:8
571   |
572LL |     if true..(let 0 = 0) {}
573   |        ^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
574   |
575   = note: expected type `bool`
576              found type `std::ops::Range<bool>`
577
578error[E0308]: mismatched types
579  --> $DIR/disallowed-positions.rs:61:8
580   |
581LL |     if ..(let 0 = 0) {}
582   |        ^^^^^^^^^^^^^ expected bool, found struct `std::ops::RangeTo`
583   |
584   = note: expected type `bool`
585              found type `std::ops::RangeTo<bool>`
586
587error[E0308]: mismatched types
588  --> $DIR/disallowed-positions.rs:63:8
589   |
590LL |     if (let 0 = 0).. {}
591   |        ^^^^^^^^^^^^^ expected bool, found struct `std::ops::RangeFrom`
592   |
593   = note: expected type `bool`
594              found type `std::ops::RangeFrom<bool>`
595
596error[E0308]: mismatched types
597  --> $DIR/disallowed-positions.rs:67:12
598   |
599LL |     if let Range { start: _, end: _ } = true..true && false {}
600   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this match expression has type `bool`
601   |            |
602   |            expected bool, found struct `std::ops::Range`
603   |
604   = note: expected type `bool`
605              found type `std::ops::Range<_>`
606
607error[E0308]: mismatched types
608  --> $DIR/disallowed-positions.rs:67:8
609   |
610LL |     if let Range { start: _, end: _ } = true..true && false {}
611   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
612   |
613   = note: expected type `bool`
614              found type `std::ops::Range<bool>`
615
616error[E0308]: mismatched types
617  --> $DIR/disallowed-positions.rs:71:12
618   |
619LL |     if let Range { start: _, end: _ } = true..true || false {}
620   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this match expression has type `bool`
621   |            |
622   |            expected bool, found struct `std::ops::Range`
623   |
624   = note: expected type `bool`
625              found type `std::ops::Range<_>`
626
627error[E0308]: mismatched types
628  --> $DIR/disallowed-positions.rs:71:8
629   |
630LL |     if let Range { start: _, end: _ } = true..true || false {}
631   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
632   |
633   = note: expected type `bool`
634              found type `std::ops::Range<bool>`
635
636error[E0308]: mismatched types
637  --> $DIR/disallowed-positions.rs:78:12
638   |
639LL |     if let Range { start: F, end } = F..|| true {}
640   |            ^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found struct `std::ops::Range`
641   |
642   = note: expected type `fn() -> bool`
643              found type `std::ops::Range<_>`
644
645error[E0308]: mismatched types
646  --> $DIR/disallowed-positions.rs:78:41
647   |
648LL |     if let Range { start: F, end } = F..|| true {}
649   |                                         ^^^^^^^ expected bool, found closure
650   |
651   = note: expected type `bool`
652              found type `[closure@$DIR/disallowed-positions.rs:78:41: 78:48]`
653
654error[E0308]: mismatched types
655  --> $DIR/disallowed-positions.rs:78:8
656   |
657LL |     if let Range { start: F, end } = F..|| true {}
658   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
659   |
660   = note: expected type `bool`
661              found type `std::ops::Range<bool>`
662
663error[E0308]: mismatched types
664  --> $DIR/disallowed-positions.rs:86:12
665   |
666LL |     if let Range { start: true, end } = t..&&false {}
667   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   - this match expression has type `bool`
668   |            |
669   |            expected bool, found struct `std::ops::Range`
670   |
671   = note: expected type `bool`
672              found type `std::ops::Range<_>`
673
674error[E0308]: mismatched types
675  --> $DIR/disallowed-positions.rs:86:44
676   |
677LL |     if let Range { start: true, end } = t..&&false {}
678   |                                            ^^^^^^^ expected bool, found &&bool
679   |
680   = note: expected type `bool`
681              found type `&&bool`
682
683error[E0308]: mismatched types
684  --> $DIR/disallowed-positions.rs:86:8
685   |
686LL |     if let Range { start: true, end } = t..&&false {}
687   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
688   |
689   = note: expected type `bool`
690              found type `std::ops::Range<bool>`
691
692error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
693  --> $DIR/disallowed-positions.rs:42:20
694   |
695LL |         if let 0 = 0? {}
696   |                    ^^ the `?` operator cannot be applied to type `{integer}`
697   |
698   = help: the trait `std::ops::Try` is not implemented for `{integer}`
699   = note: required by `std::ops::Try::into_result`
700
701error[E0308]: mismatched types
702  --> $DIR/disallowed-positions.rs:96:11
703   |
704LL |     while &let 0 = 0 {}
705   |           ^^^^^^^^^^ expected bool, found &bool
706   |
707   = note: expected type `bool`
708              found type `&bool`
709
710error[E0614]: type `bool` cannot be dereferenced
711  --> $DIR/disallowed-positions.rs:100:11
712   |
713LL |     while *let 0 = 0 {}
714   |           ^^^^^^^^^^
715
716error[E0600]: cannot apply unary operator `-` to type `bool`
717  --> $DIR/disallowed-positions.rs:102:11
718   |
719LL |     while -let 0 = 0 {}
720   |           ^^^^^^^^^^ cannot apply unary operator `-`
721   |
722   = note: an implementation of `std::ops::Neg` might be missing for `bool`
723
724error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
725  --> $DIR/disallowed-positions.rs:110:11
726   |
727LL |     while (let 0 = 0)? {}
728   |           ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool`
729   |
730   = help: the trait `std::ops::Try` is not implemented for `bool`
731   = note: required by `std::ops::Try::into_result`
732
733error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`)
734  --> $DIR/disallowed-positions.rs:110:11
735   |
736LL |     while (let 0 = 0)? {}
737   |           ^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()`
738   |
739   = help: the trait `std::ops::Try` is not implemented for `()`
740   = note: required by `std::ops::Try::from_error`
741
742error[E0308]: mismatched types
743  --> $DIR/disallowed-positions.rs:120:11
744   |
745LL |     while x = let 0 = 0 {}
746   |           ^^^^^^^^^^^^^
747   |           |
748   |           expected bool, found ()
749   |           help: try comparing for equality: `x == let 0 = 0`
750   |
751   = note: expected type `bool`
752              found type `()`
753
754error[E0308]: mismatched types
755  --> $DIR/disallowed-positions.rs:123:11
756   |
757LL |     while true..(let 0 = 0) {}
758   |           ^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
759   |
760   = note: expected type `bool`
761              found type `std::ops::Range<bool>`
762
763error[E0308]: mismatched types
764  --> $DIR/disallowed-positions.rs:125:11
765   |
766LL |     while ..(let 0 = 0) {}
767   |           ^^^^^^^^^^^^^ expected bool, found struct `std::ops::RangeTo`
768   |
769   = note: expected type `bool`
770              found type `std::ops::RangeTo<bool>`
771
772error[E0308]: mismatched types
773  --> $DIR/disallowed-positions.rs:127:11
774   |
775LL |     while (let 0 = 0).. {}
776   |           ^^^^^^^^^^^^^ expected bool, found struct `std::ops::RangeFrom`
777   |
778   = note: expected type `bool`
779              found type `std::ops::RangeFrom<bool>`
780
781error[E0308]: mismatched types
782  --> $DIR/disallowed-positions.rs:131:15
783   |
784LL |     while let Range { start: _, end: _ } = true..true && false {}
785   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this match expression has type `bool`
786   |               |
787   |               expected bool, found struct `std::ops::Range`
788   |
789   = note: expected type `bool`
790              found type `std::ops::Range<_>`
791
792error[E0308]: mismatched types
793  --> $DIR/disallowed-positions.rs:131:11
794   |
795LL |     while let Range { start: _, end: _ } = true..true && false {}
796   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
797   |
798   = note: expected type `bool`
799              found type `std::ops::Range<bool>`
800
801error[E0308]: mismatched types
802  --> $DIR/disallowed-positions.rs:135:15
803   |
804LL |     while let Range { start: _, end: _ } = true..true || false {}
805   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this match expression has type `bool`
806   |               |
807   |               expected bool, found struct `std::ops::Range`
808   |
809   = note: expected type `bool`
810              found type `std::ops::Range<_>`
811
812error[E0308]: mismatched types
813  --> $DIR/disallowed-positions.rs:135:11
814   |
815LL |     while let Range { start: _, end: _ } = true..true || false {}
816   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
817   |
818   = note: expected type `bool`
819              found type `std::ops::Range<bool>`
820
821error[E0308]: mismatched types
822  --> $DIR/disallowed-positions.rs:142:15
823   |
824LL |     while let Range { start: F, end } = F..|| true {}
825   |               ^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found struct `std::ops::Range`
826   |
827   = note: expected type `fn() -> bool`
828              found type `std::ops::Range<_>`
829
830error[E0308]: mismatched types
831  --> $DIR/disallowed-positions.rs:142:44
832   |
833LL |     while let Range { start: F, end } = F..|| true {}
834   |                                            ^^^^^^^ expected bool, found closure
835   |
836   = note: expected type `bool`
837              found type `[closure@$DIR/disallowed-positions.rs:142:44: 142:51]`
838
839error[E0308]: mismatched types
840  --> $DIR/disallowed-positions.rs:142:11
841   |
842LL |     while let Range { start: F, end } = F..|| true {}
843   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
844   |
845   = note: expected type `bool`
846              found type `std::ops::Range<bool>`
847
848error[E0308]: mismatched types
849  --> $DIR/disallowed-positions.rs:150:15
850   |
851LL |     while let Range { start: true, end } = t..&&false {}
852   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   - this match expression has type `bool`
853   |               |
854   |               expected bool, found struct `std::ops::Range`
855   |
856   = note: expected type `bool`
857              found type `std::ops::Range<_>`
858
859error[E0308]: mismatched types
860  --> $DIR/disallowed-positions.rs:150:47
861   |
862LL |     while let Range { start: true, end } = t..&&false {}
863   |                                               ^^^^^^^ expected bool, found &&bool
864   |
865   = note: expected type `bool`
866              found type `&&bool`
867
868error[E0308]: mismatched types
869  --> $DIR/disallowed-positions.rs:150:11
870   |
871LL |     while let Range { start: true, end } = t..&&false {}
872   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
873   |
874   = note: expected type `bool`
875              found type `std::ops::Range<bool>`
876
877error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
878  --> $DIR/disallowed-positions.rs:106:23
879   |
880LL |         while let 0 = 0? {}
881   |                       ^^ the `?` operator cannot be applied to type `{integer}`
882   |
883   = help: the trait `std::ops::Try` is not implemented for `{integer}`
884   = note: required by `std::ops::Try::into_result`
885
886error[E0614]: type `bool` cannot be dereferenced
887  --> $DIR/disallowed-positions.rs:173:5
888   |
889LL |     *let 0 = 0;
890   |     ^^^^^^^^^^
891
892error[E0600]: cannot apply unary operator `-` to type `bool`
893  --> $DIR/disallowed-positions.rs:175:5
894   |
895LL |     -let 0 = 0;
896   |     ^^^^^^^^^^ cannot apply unary operator `-`
897   |
898   = note: an implementation of `std::ops::Neg` might be missing for `bool`
899
900error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
901  --> $DIR/disallowed-positions.rs:183:5
902   |
903LL |     (let 0 = 0)?;
904   |     ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool`
905   |
906   = help: the trait `std::ops::Try` is not implemented for `bool`
907   = note: required by `std::ops::Try::into_result`
908
909error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`)
910  --> $DIR/disallowed-positions.rs:183:5
911   |
912LL |     (let 0 = 0)?;
913   |     ^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()`
914   |
915   = help: the trait `std::ops::Try` is not implemented for `()`
916   = note: required by `std::ops::Try::from_error`
917
918error[E0308]: mismatched types
919  --> $DIR/disallowed-positions.rs:198:10
920   |
921LL |     (let Range { start: _, end: _ } = true..true || false);
922   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this match expression has type `bool`
923   |          |
924   |          expected bool, found struct `std::ops::Range`
925   |
926   = note: expected type `bool`
927              found type `std::ops::Range<_>`
928
929error[E0308]: mismatched types
930  --> $DIR/disallowed-positions.rs:207:5
931   |
932LL | fn outside_if_and_while_expr() {
933   |                                - help: try adding a return type: `-> &bool`
934...
935LL |     &let 0 = 0
936   |     ^^^^^^^^^^ expected (), found &bool
937   |
938   = note: expected type `()`
939              found type `&bool`
940
941error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
942  --> $DIR/disallowed-positions.rs:179:17
943   |
944LL |         let 0 = 0?;
945   |                 ^^ the `?` operator cannot be applied to type `{integer}`
946   |
947   = help: the trait `std::ops::Try` is not implemented for `{integer}`
948   = note: required by `std::ops::Try::into_result`
949
950error[E0019]: constant contains unimplemented expression type
951  --> $DIR/disallowed-positions.rs:218:25
952   |
953LL |         true && let 1 = 1
954   |                         ^
955
956error[E0019]: constant contains unimplemented expression type
957  --> $DIR/disallowed-positions.rs:218:21
958   |
959LL |         true && let 1 = 1
960   |                     ^
961
962error[E0019]: constant contains unimplemented expression type
963  --> $DIR/disallowed-positions.rs:224:25
964   |
965LL |         true && let 1 = 1
966   |                         ^
967
968error[E0019]: constant contains unimplemented expression type
969  --> $DIR/disallowed-positions.rs:224:21
970   |
971LL |         true && let 1 = 1
972   |                     ^
973
974error[E0019]: constant contains unimplemented expression type
975  --> $DIR/disallowed-positions.rs:230:25
976   |
977LL |         true && let 1 = 1
978   |                         ^
979
980error[E0019]: constant contains unimplemented expression type
981  --> $DIR/disallowed-positions.rs:230:21
982   |
983LL |         true && let 1 = 1
984   |                     ^
985
986error: aborting due to 109 previous errors
987
988Some errors have detailed explanations: E0019, E0277, E0308, E0600, E0614.
989For more information about an error, try `rustc --explain E0019`.