]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr
let_chains: Add tests for places where let expressions aren't allowed.
[rust.git] / src / test / ui / rfc-2497-if-let-chains / disallowed-positions.stderr
1 error: `let` expressions are not supported here
2   --> $DIR/disallowed-positions.rs:27:9
3    |
4 LL |     if &let 0 = 0 {}
5    |         ^^^^^^^^^
6    |
7    = note: only supported directly in conditions of `if`- and `while`-expressions
8    = note: as well as when nested within `&&` and parenthesis in those conditions
9
10 error: `let` expressions are not supported here
11   --> $DIR/disallowed-positions.rs:30:9
12    |
13 LL |     if !let 0 = 0 {}
14    |         ^^^^^^^^^
15    |
16    = note: only supported directly in conditions of `if`- and `while`-expressions
17    = note: as well as when nested within `&&` and parenthesis in those conditions
18
19 error: `let` expressions are not supported here
20   --> $DIR/disallowed-positions.rs:31:9
21    |
22 LL |     if *let 0 = 0 {}
23    |         ^^^^^^^^^
24    |
25    = note: only supported directly in conditions of `if`- and `while`-expressions
26    = note: as well as when nested within `&&` and parenthesis in those conditions
27
28 error: `let` expressions are not supported here
29   --> $DIR/disallowed-positions.rs:32:9
30    |
31 LL |     if -let 0 = 0 {}
32    |         ^^^^^^^^^
33    |
34    = note: only supported directly in conditions of `if`- and `while`-expressions
35    = note: as well as when nested within `&&` and parenthesis in those conditions
36
37 error: `let` expressions are not supported here
38   --> $DIR/disallowed-positions.rs:38:9
39    |
40 LL |     if (let 0 = 0)? {}
41    |         ^^^^^^^^^
42    |
43    = note: only supported directly in conditions of `if`- and `while`-expressions
44    = note: as well as when nested within `&&` and parenthesis in those conditions
45
46 error: `let` expressions are not supported here
47   --> $DIR/disallowed-positions.rs:40:16
48    |
49 LL |     if true || let 0 = 0 {}
50    |                ^^^^^^^^^
51    |
52    = note: only supported directly in conditions of `if`- and `while`-expressions
53    = note: as well as when nested within `&&` and parenthesis in those conditions
54
55 error: `let` expressions are not supported here
56   --> $DIR/disallowed-positions.rs:41:17
57    |
58 LL |     if (true || let 0 = 0) {}
59    |                 ^^^^^^^^^
60    |
61    = note: only supported directly in conditions of `if`- and `while`-expressions
62    = note: as well as when nested within `&&` and parenthesis in those conditions
63
64 error: `let` expressions are not supported here
65   --> $DIR/disallowed-positions.rs:42:25
66    |
67 LL |     if true && (true || let 0 = 0) {}
68    |                         ^^^^^^^^^
69    |
70    = note: only supported directly in conditions of `if`- and `while`-expressions
71    = note: as well as when nested within `&&` and parenthesis in those conditions
72
73 error: `let` expressions are not supported here
74   --> $DIR/disallowed-positions.rs:43:25
75    |
76 LL |     if true || (true && let 0 = 0) {}
77    |                         ^^^^^^^^^
78    |
79    = note: only supported directly in conditions of `if`- and `while`-expressions
80    = note: as well as when nested within `&&` and parenthesis in those conditions
81
82 error: `let` expressions are not supported here
83   --> $DIR/disallowed-positions.rs:46:12
84    |
85 LL |     if x = let 0 = 0 {}
86    |            ^^^^^^^^^
87    |
88    = note: only supported directly in conditions of `if`- and `while`-expressions
89    = note: as well as when nested within `&&` and parenthesis in those conditions
90
91 error: `let` expressions are not supported here
92   --> $DIR/disallowed-positions.rs:48:15
93    |
94 LL |     if true..(let 0 = 0) {}
95    |               ^^^^^^^^^
96    |
97    = note: only supported directly in conditions of `if`- and `while`-expressions
98    = note: as well as when nested within `&&` and parenthesis in those conditions
99
100 error: `let` expressions are not supported here
101   --> $DIR/disallowed-positions.rs:49:11
102    |
103 LL |     if ..(let 0 = 0) {}
104    |           ^^^^^^^^^
105    |
106    = note: only supported directly in conditions of `if`- and `while`-expressions
107    = note: as well as when nested within `&&` and parenthesis in those conditions
108
109 error: `let` expressions are not supported here
110   --> $DIR/disallowed-positions.rs:50:9
111    |
112 LL |     if (let 0 = 0).. {}
113    |         ^^^^^^^^^
114    |
115    = note: only supported directly in conditions of `if`- and `while`-expressions
116    = note: as well as when nested within `&&` and parenthesis in those conditions
117
118 error: `let` expressions are not supported here
119   --> $DIR/disallowed-positions.rs:53:8
120    |
121 LL |     if let Range { start: _, end: _ } = true..true && false {}
122    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
123    |
124    = note: only supported directly in conditions of `if`- and `while`-expressions
125    = note: as well as when nested within `&&` and parenthesis in those conditions
126
127 error: `let` expressions are not supported here
128   --> $DIR/disallowed-positions.rs:55:8
129    |
130 LL |     if let Range { start: _, end: _ } = true..true || false {}
131    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132    |
133    = note: only supported directly in conditions of `if`- and `while`-expressions
134    = note: as well as when nested within `&&` and parenthesis in those conditions
135
136 error: `let` expressions are not supported here
137   --> $DIR/disallowed-positions.rs:60:8
138    |
139 LL |     if let Range { start: F, end } = F..|| true {}
140    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
141    |
142    = note: only supported directly in conditions of `if`- and `while`-expressions
143    = note: as well as when nested within `&&` and parenthesis in those conditions
144
145 error: `let` expressions are not supported here
146   --> $DIR/disallowed-positions.rs:65:8
147    |
148 LL |     if let Range { start: true, end } = t..&&false {}
149    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
150    |
151    = note: only supported directly in conditions of `if`- and `while`-expressions
152    = note: as well as when nested within `&&` and parenthesis in those conditions
153
154 error: `let` expressions are not supported here
155   --> $DIR/disallowed-positions.rs:68:19
156    |
157 LL |     if let true = let true = true {}
158    |                   ^^^^^^^^^^^^^^^
159    |
160    = note: only supported directly in conditions of `if`- and `while`-expressions
161    = note: as well as when nested within `&&` and parenthesis in those conditions
162
163 error: `let` expressions are not supported here
164   --> $DIR/disallowed-positions.rs:72:12
165    |
166 LL |     while &let 0 = 0 {}
167    |            ^^^^^^^^^
168    |
169    = note: only supported directly in conditions of `if`- and `while`-expressions
170    = note: as well as when nested within `&&` and parenthesis in those conditions
171
172 error: `let` expressions are not supported here
173   --> $DIR/disallowed-positions.rs:74:12
174    |
175 LL |     while !let 0 = 0 {}
176    |            ^^^^^^^^^
177    |
178    = note: only supported directly in conditions of `if`- and `while`-expressions
179    = note: as well as when nested within `&&` and parenthesis in those conditions
180
181 error: `let` expressions are not supported here
182   --> $DIR/disallowed-positions.rs:75:12
183    |
184 LL |     while *let 0 = 0 {}
185    |            ^^^^^^^^^
186    |
187    = note: only supported directly in conditions of `if`- and `while`-expressions
188    = note: as well as when nested within `&&` and parenthesis in those conditions
189
190 error: `let` expressions are not supported here
191   --> $DIR/disallowed-positions.rs:76:12
192    |
193 LL |     while -let 0 = 0 {}
194    |            ^^^^^^^^^
195    |
196    = note: only supported directly in conditions of `if`- and `while`-expressions
197    = note: as well as when nested within `&&` and parenthesis in those conditions
198
199 error: `let` expressions are not supported here
200   --> $DIR/disallowed-positions.rs:82:12
201    |
202 LL |     while (let 0 = 0)? {}
203    |            ^^^^^^^^^
204    |
205    = note: only supported directly in conditions of `if`- and `while`-expressions
206    = note: as well as when nested within `&&` and parenthesis in those conditions
207
208 error: `let` expressions are not supported here
209   --> $DIR/disallowed-positions.rs:84:19
210    |
211 LL |     while true || let 0 = 0 {}
212    |                   ^^^^^^^^^
213    |
214    = note: only supported directly in conditions of `if`- and `while`-expressions
215    = note: as well as when nested within `&&` and parenthesis in those conditions
216
217 error: `let` expressions are not supported here
218   --> $DIR/disallowed-positions.rs:85:20
219    |
220 LL |     while (true || let 0 = 0) {}
221    |                    ^^^^^^^^^
222    |
223    = note: only supported directly in conditions of `if`- and `while`-expressions
224    = note: as well as when nested within `&&` and parenthesis in those conditions
225
226 error: `let` expressions are not supported here
227   --> $DIR/disallowed-positions.rs:86:28
228    |
229 LL |     while true && (true || let 0 = 0) {}
230    |                            ^^^^^^^^^
231    |
232    = note: only supported directly in conditions of `if`- and `while`-expressions
233    = note: as well as when nested within `&&` and parenthesis in those conditions
234
235 error: `let` expressions are not supported here
236   --> $DIR/disallowed-positions.rs:87:28
237    |
238 LL |     while true || (true && let 0 = 0) {}
239    |                            ^^^^^^^^^
240    |
241    = note: only supported directly in conditions of `if`- and `while`-expressions
242    = note: as well as when nested within `&&` and parenthesis in those conditions
243
244 error: `let` expressions are not supported here
245   --> $DIR/disallowed-positions.rs:90:15
246    |
247 LL |     while x = let 0 = 0 {}
248    |               ^^^^^^^^^
249    |
250    = note: only supported directly in conditions of `if`- and `while`-expressions
251    = note: as well as when nested within `&&` and parenthesis in those conditions
252
253 error: `let` expressions are not supported here
254   --> $DIR/disallowed-positions.rs:92:18
255    |
256 LL |     while true..(let 0 = 0) {}
257    |                  ^^^^^^^^^
258    |
259    = note: only supported directly in conditions of `if`- and `while`-expressions
260    = note: as well as when nested within `&&` and parenthesis in those conditions
261
262 error: `let` expressions are not supported here
263   --> $DIR/disallowed-positions.rs:93:14
264    |
265 LL |     while ..(let 0 = 0) {}
266    |              ^^^^^^^^^
267    |
268    = note: only supported directly in conditions of `if`- and `while`-expressions
269    = note: as well as when nested within `&&` and parenthesis in those conditions
270
271 error: `let` expressions are not supported here
272   --> $DIR/disallowed-positions.rs:94:12
273    |
274 LL |     while (let 0 = 0).. {}
275    |            ^^^^^^^^^
276    |
277    = note: only supported directly in conditions of `if`- and `while`-expressions
278    = note: as well as when nested within `&&` and parenthesis in those conditions
279
280 error: `let` expressions are not supported here
281   --> $DIR/disallowed-positions.rs:97:11
282    |
283 LL |     while let Range { start: _, end: _ } = true..true && false {}
284    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
285    |
286    = note: only supported directly in conditions of `if`- and `while`-expressions
287    = note: as well as when nested within `&&` and parenthesis in those conditions
288
289 error: `let` expressions are not supported here
290   --> $DIR/disallowed-positions.rs:99:11
291    |
292 LL |     while let Range { start: _, end: _ } = true..true || false {}
293    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
294    |
295    = note: only supported directly in conditions of `if`- and `while`-expressions
296    = note: as well as when nested within `&&` and parenthesis in those conditions
297
298 error: `let` expressions are not supported here
299   --> $DIR/disallowed-positions.rs:104:11
300    |
301 LL |     while let Range { start: F, end } = F..|| true {}
302    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
303    |
304    = note: only supported directly in conditions of `if`- and `while`-expressions
305    = note: as well as when nested within `&&` and parenthesis in those conditions
306
307 error: `let` expressions are not supported here
308   --> $DIR/disallowed-positions.rs:109:11
309    |
310 LL |     while let Range { start: true, end } = t..&&false {}
311    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
312    |
313    = note: only supported directly in conditions of `if`- and `while`-expressions
314    = note: as well as when nested within `&&` and parenthesis in those conditions
315
316 error: `let` expressions are not supported here
317   --> $DIR/disallowed-positions.rs:112:22
318    |
319 LL |     while let true = let true = true {}
320    |                      ^^^^^^^^^^^^^^^
321    |
322    = note: only supported directly in conditions of `if`- and `while`-expressions
323    = note: as well as when nested within `&&` and parenthesis in those conditions
324
325 error: `let` expressions are not supported here
326   --> $DIR/disallowed-positions.rs:126:6
327    |
328 LL |     &let 0 = 0;
329    |      ^^^^^^^^^
330    |
331    = note: only supported directly in conditions of `if`- and `while`-expressions
332    = note: as well as when nested within `&&` and parenthesis in those conditions
333
334 error: `let` expressions are not supported here
335   --> $DIR/disallowed-positions.rs:128:6
336    |
337 LL |     !let 0 = 0;
338    |      ^^^^^^^^^
339    |
340    = note: only supported directly in conditions of `if`- and `while`-expressions
341    = note: as well as when nested within `&&` and parenthesis in those conditions
342
343 error: `let` expressions are not supported here
344   --> $DIR/disallowed-positions.rs:129:6
345    |
346 LL |     *let 0 = 0;
347    |      ^^^^^^^^^
348    |
349    = note: only supported directly in conditions of `if`- and `while`-expressions
350    = note: as well as when nested within `&&` and parenthesis in those conditions
351
352 error: `let` expressions are not supported here
353   --> $DIR/disallowed-positions.rs:130:6
354    |
355 LL |     -let 0 = 0;
356    |      ^^^^^^^^^
357    |
358    = note: only supported directly in conditions of `if`- and `while`-expressions
359    = note: as well as when nested within `&&` and parenthesis in those conditions
360
361 error: `let` expressions are not supported here
362   --> $DIR/disallowed-positions.rs:136:6
363    |
364 LL |     (let 0 = 0)?;
365    |      ^^^^^^^^^
366    |
367    = note: only supported directly in conditions of `if`- and `while`-expressions
368    = note: as well as when nested within `&&` and parenthesis in those conditions
369
370 error: `let` expressions are not supported here
371   --> $DIR/disallowed-positions.rs:138:13
372    |
373 LL |     true || let 0 = 0;
374    |             ^^^^^^^^^
375    |
376    = note: only supported directly in conditions of `if`- and `while`-expressions
377    = note: as well as when nested within `&&` and parenthesis in those conditions
378
379 error: `let` expressions are not supported here
380   --> $DIR/disallowed-positions.rs:139:14
381    |
382 LL |     (true || let 0 = 0);
383    |              ^^^^^^^^^
384    |
385    = note: only supported directly in conditions of `if`- and `while`-expressions
386    = note: as well as when nested within `&&` and parenthesis in those conditions
387
388 error: `let` expressions are not supported here
389   --> $DIR/disallowed-positions.rs:140:22
390    |
391 LL |     true && (true || let 0 = 0);
392    |                      ^^^^^^^^^
393    |
394    = note: only supported directly in conditions of `if`- and `while`-expressions
395    = note: as well as when nested within `&&` and parenthesis in those conditions
396
397 error: `let` expressions are not supported here
398   --> $DIR/disallowed-positions.rs:143:9
399    |
400 LL |     x = let 0 = 0;
401    |         ^^^^^^^^^
402    |
403    = note: only supported directly in conditions of `if`- and `while`-expressions
404    = note: as well as when nested within `&&` and parenthesis in those conditions
405
406 error: `let` expressions are not supported here
407   --> $DIR/disallowed-positions.rs:145:12
408    |
409 LL |     true..(let 0 = 0);
410    |            ^^^^^^^^^
411    |
412    = note: only supported directly in conditions of `if`- and `while`-expressions
413    = note: as well as when nested within `&&` and parenthesis in those conditions
414
415 error: `let` expressions are not supported here
416   --> $DIR/disallowed-positions.rs:146:8
417    |
418 LL |     ..(let 0 = 0);
419    |        ^^^^^^^^^
420    |
421    = note: only supported directly in conditions of `if`- and `while`-expressions
422    = note: as well as when nested within `&&` and parenthesis in those conditions
423
424 error: `let` expressions are not supported here
425   --> $DIR/disallowed-positions.rs:147:6
426    |
427 LL |     (let 0 = 0)..;
428    |      ^^^^^^^^^
429    |
430    = note: only supported directly in conditions of `if`- and `while`-expressions
431    = note: as well as when nested within `&&` and parenthesis in those conditions
432
433 error: `let` expressions are not supported here
434   --> $DIR/disallowed-positions.rs:149:6
435    |
436 LL |     (let Range { start: _, end: _ } = true..true || false);
437    |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
438    |
439    = note: only supported directly in conditions of `if`- and `while`-expressions
440    = note: as well as when nested within `&&` and parenthesis in those conditions
441
442 error: `let` expressions are not supported here
443   --> $DIR/disallowed-positions.rs:152:6
444    |
445 LL |     (let true = let true = true);
446    |      ^^^^^^^^^^^^^^^^^^^^^^^^^^
447    |
448    = note: only supported directly in conditions of `if`- and `while`-expressions
449    = note: as well as when nested within `&&` and parenthesis in those conditions
450
451 error: `let` expressions are not supported here
452   --> $DIR/disallowed-positions.rs:152:17
453    |
454 LL |     (let true = let true = true);
455    |                 ^^^^^^^^^^^^^^^
456    |
457    = note: only supported directly in conditions of `if`- and `while`-expressions
458    = note: as well as when nested within `&&` and parenthesis in those conditions
459
460 error: `let` expressions are not supported here
461   --> $DIR/disallowed-positions.rs:157:6
462    |
463 LL |     &let 0 = 0
464    |      ^^^^^^^^^
465    |
466    = note: only supported directly in conditions of `if`- and `while`-expressions
467    = note: as well as when nested within `&&` and parenthesis in those conditions
468
469 error: `let` expressions only supported in `if`
470   --> $DIR/disallowed-positions.rs:27:9
471    |
472 LL |     if &let 0 = 0 {}
473    |         ^^^^^^^^^
474
475 error: aborting due to 53 previous errors
476