]>
Commit | Line | Data |
---|---|---|
064997fb FG |
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 | ||
29967ef6 | 409 | error: expressions must be enclosed in braces to be used as const generic arguments |
064997fb | 410 | --> $DIR/disallowed-positions.rs:415:9 |
dc9dc135 XL |
411 | | |
412 | LL | true && let 1 = 1 | |
29967ef6 XL |
413 | | ^^^^^^^^^^^^^^^^^ |
414 | | | |
415 | help: enclose the `const` expression in braces | |
416 | | | |
417 | LL | { true && let 1 = 1 } | |
94222f64 | 418 | | + + |
dc9dc135 | 419 | |
064997fb FG |
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 | ||
dc9dc135 | 498 | error: `let` expressions are not supported here |
5099ac24 | 499 | --> $DIR/disallowed-positions.rs:29:9 |
dc9dc135 | 500 | | |
04454e1e FG |
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 | |
064997fb | 512 | --> $DIR/disallowed-positions.rs:33:11 |
04454e1e FG |
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 | |
064997fb | 519 | --> $DIR/disallowed-positions.rs:33:11 |
04454e1e FG |
520 | | |
521 | LL | if (((let 0 = 1))) {} | |
522 | | ^^^^^^^^^ | |
523 | ||
524 | error: `let` expressions are not supported here | |
064997fb | 525 | --> $DIR/disallowed-positions.rs:37:9 |
04454e1e FG |
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 | |
064997fb | 532 | --> $DIR/disallowed-positions.rs:37:9 |
04454e1e FG |
533 | | |
534 | LL | if (let 0 = 1) && true {} | |
535 | | ^^^^^^^^^ | |
536 | ||
537 | error: `let` expressions are not supported here | |
064997fb | 538 | --> $DIR/disallowed-positions.rs:41:17 |
04454e1e FG |
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 | |
064997fb | 545 | --> $DIR/disallowed-positions.rs:41:17 |
04454e1e FG |
546 | | |
547 | LL | if true && (let 0 = 1) {} | |
548 | | ^^^^^^^^^ | |
549 | ||
550 | error: `let` expressions are not supported here | |
064997fb | 551 | --> $DIR/disallowed-positions.rs:45:9 |
04454e1e FG |
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 | |
064997fb | 558 | --> $DIR/disallowed-positions.rs:45:9 |
04454e1e FG |
559 | | |
560 | LL | if (let 0 = 1) && (let 0 = 1) {} | |
561 | | ^^^^^^^^^ | |
562 | ||
563 | error: `let` expressions are not supported here | |
064997fb | 564 | --> $DIR/disallowed-positions.rs:45:24 |
04454e1e FG |
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 | |
064997fb | 571 | --> $DIR/disallowed-positions.rs:45:24 |
04454e1e FG |
572 | | |
573 | LL | if (let 0 = 1) && (let 0 = 1) {} | |
574 | | ^^^^^^^^^ | |
575 | ||
576 | error: `let` expressions are not supported here | |
064997fb | 577 | --> $DIR/disallowed-positions.rs:51:35 |
04454e1e FG |
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 | |
064997fb | 584 | --> $DIR/disallowed-positions.rs:51:35 |
04454e1e FG |
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 | |
064997fb | 590 | --> $DIR/disallowed-positions.rs:51:48 |
04454e1e FG |
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 | |
064997fb | 597 | --> $DIR/disallowed-positions.rs:51:35 |
04454e1e FG |
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 | |
064997fb | 603 | --> $DIR/disallowed-positions.rs:51:61 |
04454e1e FG |
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 | |
064997fb | 610 | --> $DIR/disallowed-positions.rs:51:35 |
04454e1e FG |
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 | |
064997fb | 616 | --> $DIR/disallowed-positions.rs:61:12 |
04454e1e FG |
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 | |
064997fb | 623 | --> $DIR/disallowed-positions.rs:61:12 |
04454e1e FG |
624 | | |
625 | LL | while (let 0 = 1) {} | |
626 | | ^^^^^^^^^ | |
627 | ||
628 | error: `let` expressions are not supported here | |
064997fb | 629 | --> $DIR/disallowed-positions.rs:65:14 |
04454e1e FG |
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 | |
064997fb | 636 | --> $DIR/disallowed-positions.rs:65:14 |
04454e1e FG |
637 | | |
638 | LL | while (((let 0 = 1))) {} | |
639 | | ^^^^^^^^^ | |
640 | ||
641 | error: `let` expressions are not supported here | |
064997fb | 642 | --> $DIR/disallowed-positions.rs:69:12 |
04454e1e FG |
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 | |
064997fb | 649 | --> $DIR/disallowed-positions.rs:69:12 |
04454e1e FG |
650 | | |
651 | LL | while (let 0 = 1) && true {} | |
652 | | ^^^^^^^^^ | |
653 | ||
654 | error: `let` expressions are not supported here | |
064997fb | 655 | --> $DIR/disallowed-positions.rs:73:20 |
04454e1e FG |
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 | |
064997fb | 662 | --> $DIR/disallowed-positions.rs:73:20 |
04454e1e FG |
663 | | |
664 | LL | while true && (let 0 = 1) {} | |
665 | | ^^^^^^^^^ | |
666 | ||
667 | error: `let` expressions are not supported here | |
064997fb | 668 | --> $DIR/disallowed-positions.rs:77:12 |
04454e1e FG |
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 | |
064997fb | 675 | --> $DIR/disallowed-positions.rs:77:12 |
04454e1e FG |
676 | | |
677 | LL | while (let 0 = 1) && (let 0 = 1) {} | |
678 | | ^^^^^^^^^ | |
679 | ||
680 | error: `let` expressions are not supported here | |
064997fb | 681 | --> $DIR/disallowed-positions.rs:77:27 |
04454e1e FG |
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 | |
064997fb | 688 | --> $DIR/disallowed-positions.rs:77:27 |
04454e1e FG |
689 | | |
690 | LL | while (let 0 = 1) && (let 0 = 1) {} | |
691 | | ^^^^^^^^^ | |
692 | ||
693 | error: `let` expressions are not supported here | |
064997fb | 694 | --> $DIR/disallowed-positions.rs:83:38 |
04454e1e FG |
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 | |
064997fb | 701 | --> $DIR/disallowed-positions.rs:83:38 |
04454e1e FG |
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 | |
064997fb | 707 | --> $DIR/disallowed-positions.rs:83:51 |
04454e1e FG |
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 | |
064997fb | 714 | --> $DIR/disallowed-positions.rs:83:38 |
04454e1e FG |
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 | |
064997fb | 720 | --> $DIR/disallowed-positions.rs:83:64 |
04454e1e FG |
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 | |
064997fb | 727 | --> $DIR/disallowed-positions.rs:83:38 |
04454e1e FG |
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 | |
064997fb | 733 | --> $DIR/disallowed-positions.rs:99:16 |
04454e1e FG |
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 | |
064997fb | 740 | --> $DIR/disallowed-positions.rs:99:16 |
04454e1e FG |
741 | | |
742 | LL | use_expr!((let 0 = 1 && 0 == 0)); | |
743 | | ^^^^^^^^^^^^^^^^^^^ | |
744 | ||
745 | error: `let` expressions are not supported here | |
064997fb | 746 | --> $DIR/disallowed-positions.rs:99:16 |
04454e1e FG |
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 | |
064997fb | 753 | --> $DIR/disallowed-positions.rs:99:16 |
04454e1e FG |
754 | | |
755 | LL | use_expr!((let 0 = 1 && 0 == 0)); | |
756 | | ^^^^^^^^^^^^^^^^^^^ | |
757 | ||
758 | error: `let` expressions are not supported here | |
064997fb | 759 | --> $DIR/disallowed-positions.rs:103:16 |
04454e1e FG |
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 | |
064997fb | 766 | --> $DIR/disallowed-positions.rs:103:16 |
04454e1e FG |
767 | | |
768 | LL | use_expr!((let 0 = 1)); | |
769 | | ^^^^^^^^^ | |
770 | ||
771 | error: `let` expressions are not supported here | |
064997fb | 772 | --> $DIR/disallowed-positions.rs:103:16 |
04454e1e FG |
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 | |
064997fb | 779 | --> $DIR/disallowed-positions.rs:103:16 |
04454e1e FG |
780 | | |
781 | LL | use_expr!((let 0 = 1)); | |
782 | | ^^^^^^^^^ | |
783 | ||
784 | error: `let` expressions are not supported here | |
064997fb | 785 | --> $DIR/disallowed-positions.rs:110:9 |
04454e1e | 786 | | |
dc9dc135 XL |
787 | LL | if &let 0 = 0 {} |
788 | | ^^^^^^^^^ | |
789 | | | |
5e7ed085 | 790 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
791 | |
792 | error: `let` expressions are not supported here | |
064997fb | 793 | --> $DIR/disallowed-positions.rs:115:9 |
dc9dc135 XL |
794 | | |
795 | LL | if !let 0 = 0 {} | |
796 | | ^^^^^^^^^ | |
797 | | | |
5e7ed085 | 798 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
799 | |
800 | error: `let` expressions are not supported here | |
064997fb | 801 | --> $DIR/disallowed-positions.rs:118:9 |
dc9dc135 XL |
802 | | |
803 | LL | if *let 0 = 0 {} | |
804 | | ^^^^^^^^^ | |
805 | | | |
5e7ed085 | 806 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
807 | |
808 | error: `let` expressions are not supported here | |
064997fb | 809 | --> $DIR/disallowed-positions.rs:122:9 |
dc9dc135 XL |
810 | | |
811 | LL | if -let 0 = 0 {} | |
812 | | ^^^^^^^^^ | |
813 | | | |
5e7ed085 | 814 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
815 | |
816 | error: `let` expressions are not supported here | |
064997fb | 817 | --> $DIR/disallowed-positions.rs:132:9 |
dc9dc135 XL |
818 | | |
819 | LL | if (let 0 = 0)? {} | |
820 | | ^^^^^^^^^ | |
821 | | | |
5e7ed085 | 822 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 823 | note: `let`s wrapped in parentheses are not supported in a context with let chains |
064997fb | 824 | --> $DIR/disallowed-positions.rs:132:9 |
04454e1e FG |
825 | | |
826 | LL | if (let 0 = 0)? {} | |
827 | | ^^^^^^^^^ | |
dc9dc135 XL |
828 | |
829 | error: `let` expressions are not supported here | |
064997fb | 830 | --> $DIR/disallowed-positions.rs:138:16 |
dc9dc135 XL |
831 | | |
832 | LL | if true || let 0 = 0 {} | |
833 | | ^^^^^^^^^ | |
834 | | | |
5e7ed085 | 835 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 836 | note: `||` operators are not supported in let chain expressions |
064997fb | 837 | --> $DIR/disallowed-positions.rs:138:13 |
5e7ed085 FG |
838 | | |
839 | LL | if true || let 0 = 0 {} | |
840 | | ^^ | |
dc9dc135 XL |
841 | |
842 | error: `let` expressions are not supported here | |
064997fb | 843 | --> $DIR/disallowed-positions.rs:141:17 |
dc9dc135 XL |
844 | | |
845 | LL | if (true || let 0 = 0) {} | |
846 | | ^^^^^^^^^ | |
847 | | | |
5e7ed085 | 848 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 849 | note: `||` operators are not supported in let chain expressions |
064997fb | 850 | --> $DIR/disallowed-positions.rs:141:14 |
5e7ed085 FG |
851 | | |
852 | LL | if (true || let 0 = 0) {} | |
853 | | ^^ | |
dc9dc135 XL |
854 | |
855 | error: `let` expressions are not supported here | |
064997fb | 856 | --> $DIR/disallowed-positions.rs:144:25 |
dc9dc135 XL |
857 | | |
858 | LL | if true && (true || let 0 = 0) {} | |
859 | | ^^^^^^^^^ | |
860 | | | |
5e7ed085 | 861 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 862 | note: `||` operators are not supported in let chain expressions |
064997fb | 863 | --> $DIR/disallowed-positions.rs:144:22 |
5e7ed085 FG |
864 | | |
865 | LL | if true && (true || let 0 = 0) {} | |
866 | | ^^ | |
dc9dc135 XL |
867 | |
868 | error: `let` expressions are not supported here | |
064997fb | 869 | --> $DIR/disallowed-positions.rs:147:25 |
dc9dc135 XL |
870 | | |
871 | LL | if true || (true && let 0 = 0) {} | |
872 | | ^^^^^^^^^ | |
873 | | | |
5e7ed085 | 874 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 875 | note: `let`s wrapped in parentheses are not supported in a context with let chains |
064997fb | 876 | --> $DIR/disallowed-positions.rs:147:17 |
5e7ed085 FG |
877 | | |
878 | LL | if true || (true && let 0 = 0) {} | |
04454e1e | 879 | | ^^^^^^^^^^^^^^^^^ |
dc9dc135 XL |
880 | |
881 | error: `let` expressions are not supported here | |
064997fb | 882 | --> $DIR/disallowed-positions.rs:152:12 |
dc9dc135 XL |
883 | | |
884 | LL | if x = let 0 = 0 {} | |
885 | | ^^^^^^^^^ | |
886 | | | |
5e7ed085 | 887 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
888 | |
889 | error: `let` expressions are not supported here | |
064997fb | 890 | --> $DIR/disallowed-positions.rs:157:15 |
dc9dc135 XL |
891 | | |
892 | LL | if true..(let 0 = 0) {} | |
893 | | ^^^^^^^^^ | |
894 | | | |
5e7ed085 | 895 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 896 | note: `let`s wrapped in parentheses are not supported in a context with let chains |
064997fb | 897 | --> $DIR/disallowed-positions.rs:157:15 |
04454e1e FG |
898 | | |
899 | LL | if true..(let 0 = 0) {} | |
900 | | ^^^^^^^^^ | |
dc9dc135 XL |
901 | |
902 | error: `let` expressions are not supported here | |
064997fb | 903 | --> $DIR/disallowed-positions.rs:161:11 |
dc9dc135 XL |
904 | | |
905 | LL | if ..(let 0 = 0) {} | |
906 | | ^^^^^^^^^ | |
907 | | | |
5e7ed085 | 908 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 909 | note: `let`s wrapped in parentheses are not supported in a context with let chains |
064997fb | 910 | --> $DIR/disallowed-positions.rs:161:11 |
04454e1e FG |
911 | | |
912 | LL | if ..(let 0 = 0) {} | |
913 | | ^^^^^^^^^ | |
dc9dc135 XL |
914 | |
915 | error: `let` expressions are not supported here | |
064997fb | 916 | --> $DIR/disallowed-positions.rs:165:9 |
dc9dc135 XL |
917 | | |
918 | LL | if (let 0 = 0).. {} | |
919 | | ^^^^^^^^^ | |
920 | | | |
5e7ed085 | 921 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 922 | note: `let`s wrapped in parentheses are not supported in a context with let chains |
064997fb | 923 | --> $DIR/disallowed-positions.rs:165:9 |
04454e1e FG |
924 | | |
925 | LL | if (let 0 = 0).. {} | |
926 | | ^^^^^^^^^ | |
dc9dc135 XL |
927 | |
928 | error: `let` expressions are not supported here | |
064997fb | 929 | --> $DIR/disallowed-positions.rs:171:8 |
dc9dc135 XL |
930 | | |
931 | LL | if let Range { start: _, end: _ } = true..true && false {} | |
932 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
933 | | | |
5e7ed085 | 934 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
935 | |
936 | error: `let` expressions are not supported here | |
064997fb | 937 | --> $DIR/disallowed-positions.rs:175:8 |
dc9dc135 XL |
938 | | |
939 | LL | if let Range { start: _, end: _ } = true..true || false {} | |
940 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
941 | | | |
5e7ed085 | 942 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
943 | |
944 | error: `let` expressions are not supported here | |
064997fb | 945 | --> $DIR/disallowed-positions.rs:182:8 |
dc9dc135 XL |
946 | | |
947 | LL | if let Range { start: F, end } = F..|| true {} | |
948 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
949 | | | |
5e7ed085 | 950 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
951 | |
952 | error: `let` expressions are not supported here | |
064997fb | 953 | --> $DIR/disallowed-positions.rs:190:8 |
dc9dc135 XL |
954 | | |
955 | LL | if let Range { start: true, end } = t..&&false {} | |
956 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
957 | | | |
5e7ed085 | 958 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
959 | |
960 | error: `let` expressions are not supported here | |
064997fb | 961 | --> $DIR/disallowed-positions.rs:196:19 |
dc9dc135 XL |
962 | | |
963 | LL | if let true = let true = true {} | |
964 | | ^^^^^^^^^^^^^^^ | |
965 | | | |
5e7ed085 | 966 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
967 | |
968 | error: `let` expressions are not supported here | |
064997fb | 969 | --> $DIR/disallowed-positions.rs:202:12 |
dc9dc135 XL |
970 | | |
971 | LL | while &let 0 = 0 {} | |
972 | | ^^^^^^^^^ | |
973 | | | |
5e7ed085 | 974 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
975 | |
976 | error: `let` expressions are not supported here | |
064997fb | 977 | --> $DIR/disallowed-positions.rs:207:12 |
dc9dc135 XL |
978 | | |
979 | LL | while !let 0 = 0 {} | |
980 | | ^^^^^^^^^ | |
981 | | | |
5e7ed085 | 982 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
983 | |
984 | error: `let` expressions are not supported here | |
064997fb | 985 | --> $DIR/disallowed-positions.rs:210:12 |
dc9dc135 XL |
986 | | |
987 | LL | while *let 0 = 0 {} | |
988 | | ^^^^^^^^^ | |
989 | | | |
5e7ed085 | 990 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
991 | |
992 | error: `let` expressions are not supported here | |
064997fb | 993 | --> $DIR/disallowed-positions.rs:214:12 |
dc9dc135 XL |
994 | | |
995 | LL | while -let 0 = 0 {} | |
996 | | ^^^^^^^^^ | |
997 | | | |
5e7ed085 | 998 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
999 | |
1000 | error: `let` expressions are not supported here | |
064997fb | 1001 | --> $DIR/disallowed-positions.rs:224:12 |
dc9dc135 XL |
1002 | | |
1003 | LL | while (let 0 = 0)? {} | |
1004 | | ^^^^^^^^^ | |
1005 | | | |
5e7ed085 | 1006 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 1007 | note: `let`s wrapped in parentheses are not supported in a context with let chains |
064997fb | 1008 | --> $DIR/disallowed-positions.rs:224:12 |
04454e1e FG |
1009 | | |
1010 | LL | while (let 0 = 0)? {} | |
1011 | | ^^^^^^^^^ | |
dc9dc135 XL |
1012 | |
1013 | error: `let` expressions are not supported here | |
064997fb | 1014 | --> $DIR/disallowed-positions.rs:230:19 |
dc9dc135 XL |
1015 | | |
1016 | LL | while true || let 0 = 0 {} | |
1017 | | ^^^^^^^^^ | |
1018 | | | |
5e7ed085 | 1019 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 1020 | note: `||` operators are not supported in let chain expressions |
064997fb | 1021 | --> $DIR/disallowed-positions.rs:230:16 |
5e7ed085 FG |
1022 | | |
1023 | LL | while true || let 0 = 0 {} | |
1024 | | ^^ | |
dc9dc135 XL |
1025 | |
1026 | error: `let` expressions are not supported here | |
064997fb | 1027 | --> $DIR/disallowed-positions.rs:233:20 |
dc9dc135 XL |
1028 | | |
1029 | LL | while (true || let 0 = 0) {} | |
1030 | | ^^^^^^^^^ | |
1031 | | | |
5e7ed085 | 1032 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 1033 | note: `||` operators are not supported in let chain expressions |
064997fb | 1034 | --> $DIR/disallowed-positions.rs:233:17 |
5e7ed085 FG |
1035 | | |
1036 | LL | while (true || let 0 = 0) {} | |
1037 | | ^^ | |
dc9dc135 XL |
1038 | |
1039 | error: `let` expressions are not supported here | |
064997fb | 1040 | --> $DIR/disallowed-positions.rs:236:28 |
dc9dc135 XL |
1041 | | |
1042 | LL | while true && (true || let 0 = 0) {} | |
1043 | | ^^^^^^^^^ | |
1044 | | | |
5e7ed085 | 1045 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 1046 | note: `||` operators are not supported in let chain expressions |
064997fb | 1047 | --> $DIR/disallowed-positions.rs:236:25 |
5e7ed085 FG |
1048 | | |
1049 | LL | while true && (true || let 0 = 0) {} | |
1050 | | ^^ | |
dc9dc135 XL |
1051 | |
1052 | error: `let` expressions are not supported here | |
064997fb | 1053 | --> $DIR/disallowed-positions.rs:239:28 |
dc9dc135 XL |
1054 | | |
1055 | LL | while true || (true && let 0 = 0) {} | |
1056 | | ^^^^^^^^^ | |
1057 | | | |
5e7ed085 | 1058 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 1059 | note: `let`s wrapped in parentheses are not supported in a context with let chains |
064997fb | 1060 | --> $DIR/disallowed-positions.rs:239:20 |
5e7ed085 FG |
1061 | | |
1062 | LL | while true || (true && let 0 = 0) {} | |
04454e1e | 1063 | | ^^^^^^^^^^^^^^^^^ |
dc9dc135 XL |
1064 | |
1065 | error: `let` expressions are not supported here | |
064997fb | 1066 | --> $DIR/disallowed-positions.rs:244:15 |
dc9dc135 XL |
1067 | | |
1068 | LL | while x = let 0 = 0 {} | |
1069 | | ^^^^^^^^^ | |
1070 | | | |
5e7ed085 | 1071 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
1072 | |
1073 | error: `let` expressions are not supported here | |
064997fb | 1074 | --> $DIR/disallowed-positions.rs:249:18 |
dc9dc135 XL |
1075 | | |
1076 | LL | while true..(let 0 = 0) {} | |
1077 | | ^^^^^^^^^ | |
1078 | | | |
5e7ed085 | 1079 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 1080 | note: `let`s wrapped in parentheses are not supported in a context with let chains |
064997fb | 1081 | --> $DIR/disallowed-positions.rs:249:18 |
04454e1e FG |
1082 | | |
1083 | LL | while true..(let 0 = 0) {} | |
1084 | | ^^^^^^^^^ | |
dc9dc135 XL |
1085 | |
1086 | error: `let` expressions are not supported here | |
064997fb | 1087 | --> $DIR/disallowed-positions.rs:253:14 |
dc9dc135 XL |
1088 | | |
1089 | LL | while ..(let 0 = 0) {} | |
1090 | | ^^^^^^^^^ | |
1091 | | | |
5e7ed085 | 1092 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 1093 | note: `let`s wrapped in parentheses are not supported in a context with let chains |
064997fb | 1094 | --> $DIR/disallowed-positions.rs:253:14 |
04454e1e FG |
1095 | | |
1096 | LL | while ..(let 0 = 0) {} | |
1097 | | ^^^^^^^^^ | |
dc9dc135 XL |
1098 | |
1099 | error: `let` expressions are not supported here | |
064997fb | 1100 | --> $DIR/disallowed-positions.rs:257:12 |
dc9dc135 XL |
1101 | | |
1102 | LL | while (let 0 = 0).. {} | |
1103 | | ^^^^^^^^^ | |
1104 | | | |
5e7ed085 | 1105 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 1106 | note: `let`s wrapped in parentheses are not supported in a context with let chains |
064997fb | 1107 | --> $DIR/disallowed-positions.rs:257:12 |
04454e1e FG |
1108 | | |
1109 | LL | while (let 0 = 0).. {} | |
1110 | | ^^^^^^^^^ | |
dc9dc135 XL |
1111 | |
1112 | error: `let` expressions are not supported here | |
064997fb | 1113 | --> $DIR/disallowed-positions.rs:263:11 |
dc9dc135 XL |
1114 | | |
1115 | LL | while let Range { start: _, end: _ } = true..true && false {} | |
1116 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
1117 | | | |
5e7ed085 | 1118 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
1119 | |
1120 | error: `let` expressions are not supported here | |
064997fb | 1121 | --> $DIR/disallowed-positions.rs:267:11 |
dc9dc135 XL |
1122 | | |
1123 | LL | while let Range { start: _, end: _ } = true..true || false {} | |
1124 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
1125 | | | |
5e7ed085 | 1126 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
1127 | |
1128 | error: `let` expressions are not supported here | |
064997fb | 1129 | --> $DIR/disallowed-positions.rs:274:11 |
dc9dc135 XL |
1130 | | |
1131 | LL | while let Range { start: F, end } = F..|| true {} | |
1132 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
1133 | | | |
5e7ed085 | 1134 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
1135 | |
1136 | error: `let` expressions are not supported here | |
064997fb | 1137 | --> $DIR/disallowed-positions.rs:282:11 |
dc9dc135 XL |
1138 | | |
1139 | LL | while let Range { start: true, end } = t..&&false {} | |
1140 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
1141 | | | |
5e7ed085 | 1142 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
1143 | |
1144 | error: `let` expressions are not supported here | |
064997fb | 1145 | --> $DIR/disallowed-positions.rs:288:22 |
dc9dc135 XL |
1146 | | |
1147 | LL | while let true = let true = true {} | |
1148 | | ^^^^^^^^^^^^^^^ | |
1149 | | | |
5e7ed085 | 1150 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
1151 | |
1152 | error: `let` expressions are not supported here | |
064997fb | 1153 | --> $DIR/disallowed-positions.rs:304:6 |
dc9dc135 XL |
1154 | | |
1155 | LL | &let 0 = 0; | |
1156 | | ^^^^^^^^^ | |
1157 | | | |
5e7ed085 | 1158 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
1159 | |
1160 | error: `let` expressions are not supported here | |
064997fb | 1161 | --> $DIR/disallowed-positions.rs:308:6 |
dc9dc135 XL |
1162 | | |
1163 | LL | !let 0 = 0; | |
1164 | | ^^^^^^^^^ | |
1165 | | | |
5e7ed085 | 1166 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
1167 | |
1168 | error: `let` expressions are not supported here | |
064997fb | 1169 | --> $DIR/disallowed-positions.rs:311:6 |
dc9dc135 XL |
1170 | | |
1171 | LL | *let 0 = 0; | |
1172 | | ^^^^^^^^^ | |
1173 | | | |
5e7ed085 | 1174 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
1175 | |
1176 | error: `let` expressions are not supported here | |
064997fb | 1177 | --> $DIR/disallowed-positions.rs:315:6 |
dc9dc135 XL |
1178 | | |
1179 | LL | -let 0 = 0; | |
1180 | | ^^^^^^^^^ | |
1181 | | | |
5e7ed085 | 1182 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
1183 | |
1184 | error: `let` expressions are not supported here | |
064997fb | 1185 | --> $DIR/disallowed-positions.rs:325:6 |
dc9dc135 XL |
1186 | | |
1187 | LL | (let 0 = 0)?; | |
1188 | | ^^^^^^^^^ | |
1189 | | | |
5e7ed085 | 1190 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 1191 | note: `let`s wrapped in parentheses are not supported in a context with let chains |
064997fb | 1192 | --> $DIR/disallowed-positions.rs:325:6 |
04454e1e FG |
1193 | | |
1194 | LL | (let 0 = 0)?; | |
1195 | | ^^^^^^^^^ | |
dc9dc135 XL |
1196 | |
1197 | error: `let` expressions are not supported here | |
064997fb | 1198 | --> $DIR/disallowed-positions.rs:331:13 |
dc9dc135 XL |
1199 | | |
1200 | LL | true || let 0 = 0; | |
1201 | | ^^^^^^^^^ | |
1202 | | | |
5e7ed085 | 1203 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 1204 | note: `||` operators are not supported in let chain expressions |
064997fb | 1205 | --> $DIR/disallowed-positions.rs:331:10 |
5e7ed085 FG |
1206 | | |
1207 | LL | true || let 0 = 0; | |
1208 | | ^^ | |
dc9dc135 XL |
1209 | |
1210 | error: `let` expressions are not supported here | |
064997fb | 1211 | --> $DIR/disallowed-positions.rs:334:14 |
dc9dc135 XL |
1212 | | |
1213 | LL | (true || let 0 = 0); | |
1214 | | ^^^^^^^^^ | |
1215 | | | |
5e7ed085 | 1216 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 1217 | note: `||` operators are not supported in let chain expressions |
064997fb | 1218 | --> $DIR/disallowed-positions.rs:334:11 |
5e7ed085 FG |
1219 | | |
1220 | LL | (true || let 0 = 0); | |
1221 | | ^^ | |
dc9dc135 XL |
1222 | |
1223 | error: `let` expressions are not supported here | |
064997fb | 1224 | --> $DIR/disallowed-positions.rs:337:22 |
dc9dc135 XL |
1225 | | |
1226 | LL | true && (true || let 0 = 0); | |
1227 | | ^^^^^^^^^ | |
1228 | | | |
5e7ed085 | 1229 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 1230 | note: `||` operators are not supported in let chain expressions |
064997fb | 1231 | --> $DIR/disallowed-positions.rs:337:19 |
5e7ed085 FG |
1232 | | |
1233 | LL | true && (true || let 0 = 0); | |
1234 | | ^^ | |
dc9dc135 XL |
1235 | |
1236 | error: `let` expressions are not supported here | |
064997fb | 1237 | --> $DIR/disallowed-positions.rs:342:9 |
dc9dc135 XL |
1238 | | |
1239 | LL | x = let 0 = 0; | |
1240 | | ^^^^^^^^^ | |
1241 | | | |
5e7ed085 | 1242 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
1243 | |
1244 | error: `let` expressions are not supported here | |
064997fb | 1245 | --> $DIR/disallowed-positions.rs:346:12 |
dc9dc135 XL |
1246 | | |
1247 | LL | true..(let 0 = 0); | |
1248 | | ^^^^^^^^^ | |
1249 | | | |
5e7ed085 | 1250 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 1251 | note: `let`s wrapped in parentheses are not supported in a context with let chains |
064997fb | 1252 | --> $DIR/disallowed-positions.rs:346:12 |
04454e1e FG |
1253 | | |
1254 | LL | true..(let 0 = 0); | |
1255 | | ^^^^^^^^^ | |
dc9dc135 XL |
1256 | |
1257 | error: `let` expressions are not supported here | |
064997fb | 1258 | --> $DIR/disallowed-positions.rs:349:8 |
dc9dc135 XL |
1259 | | |
1260 | LL | ..(let 0 = 0); | |
1261 | | ^^^^^^^^^ | |
1262 | | | |
5e7ed085 | 1263 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 1264 | note: `let`s wrapped in parentheses are not supported in a context with let chains |
064997fb | 1265 | --> $DIR/disallowed-positions.rs:349:8 |
04454e1e FG |
1266 | | |
1267 | LL | ..(let 0 = 0); | |
1268 | | ^^^^^^^^^ | |
dc9dc135 XL |
1269 | |
1270 | error: `let` expressions are not supported here | |
064997fb | 1271 | --> $DIR/disallowed-positions.rs:352:6 |
dc9dc135 XL |
1272 | | |
1273 | LL | (let 0 = 0)..; | |
1274 | | ^^^^^^^^^ | |
1275 | | | |
5e7ed085 | 1276 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 1277 | note: `let`s wrapped in parentheses are not supported in a context with let chains |
064997fb | 1278 | --> $DIR/disallowed-positions.rs:352:6 |
04454e1e FG |
1279 | | |
1280 | LL | (let 0 = 0)..; | |
1281 | | ^^^^^^^^^ | |
dc9dc135 XL |
1282 | |
1283 | error: `let` expressions are not supported here | |
064997fb | 1284 | --> $DIR/disallowed-positions.rs:356:6 |
dc9dc135 XL |
1285 | | |
1286 | LL | (let Range { start: _, end: _ } = true..true || false); | |
1287 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
1288 | | | |
5e7ed085 | 1289 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
1290 | |
1291 | error: `let` expressions are not supported here | |
064997fb | 1292 | --> $DIR/disallowed-positions.rs:361:6 |
dc9dc135 XL |
1293 | | |
1294 | LL | (let true = let true = true); | |
1295 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
1296 | | | |
5e7ed085 | 1297 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e | 1298 | note: `let`s wrapped in parentheses are not supported in a context with let chains |
064997fb | 1299 | --> $DIR/disallowed-positions.rs:361:6 |
04454e1e FG |
1300 | | |
1301 | LL | (let true = let true = true); | |
1302 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
dc9dc135 XL |
1303 | |
1304 | error: `let` expressions are not supported here | |
064997fb | 1305 | --> $DIR/disallowed-positions.rs:379:6 |
dc9dc135 XL |
1306 | | |
1307 | LL | &let 0 = 0 | |
1308 | | ^^^^^^^^^ | |
1309 | | | |
5e7ed085 | 1310 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
1311 | |
1312 | error: `let` expressions are not supported here | |
064997fb | 1313 | --> $DIR/disallowed-positions.rs:391:17 |
dc9dc135 XL |
1314 | | |
1315 | LL | true && let 1 = 1 | |
1316 | | ^^^^^^^^^ | |
1317 | | | |
5e7ed085 | 1318 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
1319 | |
1320 | error: `let` expressions are not supported here | |
064997fb | 1321 | --> $DIR/disallowed-positions.rs:397:17 |
dc9dc135 XL |
1322 | | |
1323 | LL | true && let 1 = 1 | |
1324 | | ^^^^^^^^^ | |
1325 | | | |
5e7ed085 | 1326 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 XL |
1327 | |
1328 | error: `let` expressions are not supported here | |
064997fb | 1329 | --> $DIR/disallowed-positions.rs:403:17 |
dc9dc135 XL |
1330 | | |
1331 | LL | true && let 1 = 1 | |
1332 | | ^^^^^^^^^ | |
1333 | | | |
5e7ed085 | 1334 | = note: only supported directly in conditions of `if` and `while` expressions |
dc9dc135 | 1335 | |
29967ef6 | 1336 | error: `let` expressions are not supported here |
064997fb | 1337 | --> $DIR/disallowed-positions.rs:415:17 |
29967ef6 XL |
1338 | | |
1339 | LL | true && let 1 = 1 | |
1340 | | ^^^^^^^^^ | |
1341 | | | |
5e7ed085 | 1342 | = note: only supported directly in conditions of `if` and `while` expressions |
04454e1e FG |
1343 | |
1344 | error: `let` expressions are not supported here | |
064997fb | 1345 | --> $DIR/disallowed-positions.rs:425:9 |
04454e1e FG |
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 | |
064997fb | 1352 | --> $DIR/disallowed-positions.rs:425:9 |
04454e1e FG |
1353 | | |
1354 | LL | if (let Some(a) = opt && true) { | |
1355 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
1356 | ||
1357 | error: `let` expressions are not supported here | |
064997fb | 1358 | --> $DIR/disallowed-positions.rs:430:9 |
04454e1e FG |
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 | |
064997fb | 1365 | --> $DIR/disallowed-positions.rs:430:9 |
04454e1e FG |
1366 | | |
1367 | LL | if (let Some(a) = opt) && true { | |
1368 | | ^^^^^^^^^^^^^^^^^ | |
1369 | ||
1370 | error: `let` expressions are not supported here | |
064997fb | 1371 | --> $DIR/disallowed-positions.rs:434:9 |
04454e1e FG |
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 | |
064997fb | 1378 | --> $DIR/disallowed-positions.rs:434:9 |
04454e1e FG |
1379 | | |
1380 | LL | if (let Some(a) = opt) && (let Some(b) = a) { | |
1381 | | ^^^^^^^^^^^^^^^^^ | |
1382 | ||
1383 | error: `let` expressions are not supported here | |
064997fb | 1384 | --> $DIR/disallowed-positions.rs:434:32 |
04454e1e FG |
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 | |
064997fb | 1391 | --> $DIR/disallowed-positions.rs:434:32 |
04454e1e FG |
1392 | | |
1393 | LL | if (let Some(a) = opt) && (let Some(b) = a) { | |
1394 | | ^^^^^^^^^^^^^^^ | |
1395 | ||
1396 | error: `let` expressions are not supported here | |
064997fb | 1397 | --> $DIR/disallowed-positions.rs:443:9 |
04454e1e FG |
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 | |
064997fb | 1404 | --> $DIR/disallowed-positions.rs:443:9 |
04454e1e FG |
1405 | | |
1406 | LL | if (let Some(a) = opt && (let Some(b) = a)) && b == 1 { | |
1407 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
1408 | ||
1409 | error: `let` expressions are not supported here | |
064997fb | 1410 | --> $DIR/disallowed-positions.rs:443:31 |
04454e1e FG |
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 | |
064997fb | 1417 | --> $DIR/disallowed-positions.rs:443:31 |
04454e1e FG |
1418 | | |
1419 | LL | if (let Some(a) = opt && (let Some(b) = a)) && b == 1 { | |
1420 | | ^^^^^^^^^^^^^^^ | |
1421 | ||
1422 | error: `let` expressions are not supported here | |
064997fb | 1423 | --> $DIR/disallowed-positions.rs:449:9 |
04454e1e FG |
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 | |
064997fb | 1430 | --> $DIR/disallowed-positions.rs:449:9 |
04454e1e FG |
1431 | | |
1432 | LL | if (let Some(a) = opt && (let Some(b) = a)) && true { | |
1433 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
1434 | ||
1435 | error: `let` expressions are not supported here | |
064997fb | 1436 | --> $DIR/disallowed-positions.rs:449:31 |
04454e1e FG |
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 | |
064997fb | 1443 | --> $DIR/disallowed-positions.rs:449:31 |
04454e1e FG |
1444 | | |
1445 | LL | if (let Some(a) = opt && (let Some(b) = a)) && true { | |
1446 | | ^^^^^^^^^^^^^^^ | |
1447 | ||
1448 | error: `let` expressions are not supported here | |
064997fb | 1449 | --> $DIR/disallowed-positions.rs:455:9 |
04454e1e FG |
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 | |
064997fb | 1456 | --> $DIR/disallowed-positions.rs:455:9 |
04454e1e FG |
1457 | | |
1458 | LL | if (let Some(a) = opt && (true)) && true { | |
1459 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
416331ca | 1460 | |
dc9dc135 | 1461 | error[E0308]: mismatched types |
064997fb | 1462 | --> $DIR/disallowed-positions.rs:110:8 |
dc9dc135 XL |
1463 | | |
1464 | LL | if &let 0 = 0 {} | |
94222f64 XL |
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 {} | |
923072b8 | 1471 | | |
dc9dc135 XL |
1472 | |
1473 | error[E0614]: type `bool` cannot be dereferenced | |
064997fb | 1474 | --> $DIR/disallowed-positions.rs:118:8 |
dc9dc135 XL |
1475 | | |
1476 | LL | if *let 0 = 0 {} | |
1477 | | ^^^^^^^^^^ | |
1478 | ||
1479 | error[E0600]: cannot apply unary operator `-` to type `bool` | |
064997fb | 1480 | --> $DIR/disallowed-positions.rs:122:8 |
dc9dc135 XL |
1481 | | |
1482 | LL | if -let 0 = 0 {} | |
1483 | | ^^^^^^^^^^ cannot apply unary operator `-` | |
dc9dc135 | 1484 | |
1b1a35ee | 1485 | error[E0277]: the `?` operator can only be applied to values that implement `Try` |
064997fb | 1486 | --> $DIR/disallowed-positions.rs:132:8 |
dc9dc135 XL |
1487 | | |
1488 | LL | if (let 0 = 0)? {} | |
1489 | | ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool` | |
1490 | | | |
1b1a35ee | 1491 | = help: the trait `Try` is not implemented for `bool` |
dc9dc135 | 1492 | |
17df50a5 | 1493 | error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) |
064997fb | 1494 | --> $DIR/disallowed-positions.rs:132:19 |
dc9dc135 | 1495 | | |
f2b60f7d FG |
1496 | LL | fn nested_within_if_expr() { |
1497 | | -------------------------- this function should return `Result` or `Option` to accept `?` | |
1498 | ... | |
1499 | LL | if (let 0 = 0)? {} | |
1500 | | ^ cannot use the `?` operator in a function that returns `()` | |
dc9dc135 | 1501 | | |
17df50a5 | 1502 | = help: the trait `FromResidual<_>` is not implemented for `()` |
dc9dc135 XL |
1503 | |
1504 | error[E0308]: mismatched types | |
064997fb | 1505 | --> $DIR/disallowed-positions.rs:152:8 |
dc9dc135 XL |
1506 | | |
1507 | LL | if x = let 0 = 0 {} | |
1b1a35ee XL |
1508 | | ^^^^^^^^^^^^^ expected `bool`, found `()` |
1509 | | | |
1510 | help: you might have meant to compare for equality | |
1511 | | | |
1512 | LL | if x == let 0 = 0 {} | |
94222f64 | 1513 | | ~~ |
dc9dc135 XL |
1514 | |
1515 | error[E0308]: mismatched types | |
064997fb | 1516 | --> $DIR/disallowed-positions.rs:157:8 |
dc9dc135 XL |
1517 | | |
1518 | LL | if true..(let 0 = 0) {} | |
60c5eb7d | 1519 | | ^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
1520 | | |
1521 | = note: expected type `bool` | |
60c5eb7d | 1522 | found struct `std::ops::Range<bool>` |
dc9dc135 XL |
1523 | |
1524 | error[E0308]: mismatched types | |
064997fb | 1525 | --> $DIR/disallowed-positions.rs:161:8 |
dc9dc135 XL |
1526 | | |
1527 | LL | if ..(let 0 = 0) {} | |
1b1a35ee | 1528 | | ^^^^^^^^^^^^^ expected `bool`, found struct `RangeTo` |
dc9dc135 XL |
1529 | | |
1530 | = note: expected type `bool` | |
1b1a35ee | 1531 | found struct `RangeTo<bool>` |
dc9dc135 XL |
1532 | |
1533 | error[E0308]: mismatched types | |
064997fb | 1534 | --> $DIR/disallowed-positions.rs:165:8 |
dc9dc135 XL |
1535 | | |
1536 | LL | if (let 0 = 0).. {} | |
1b1a35ee | 1537 | | ^^^^^^^^^^^^^ expected `bool`, found struct `RangeFrom` |
dc9dc135 XL |
1538 | | |
1539 | = note: expected type `bool` | |
1b1a35ee | 1540 | found struct `RangeFrom<bool>` |
dc9dc135 XL |
1541 | |
1542 | error[E0308]: mismatched types | |
064997fb | 1543 | --> $DIR/disallowed-positions.rs:171:12 |
dc9dc135 XL |
1544 | | |
1545 | LL | if let Range { start: _, end: _ } = true..true && false {} | |
dfeec247 | 1546 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool` |
dc9dc135 | 1547 | | | |
60c5eb7d | 1548 | | expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
1549 | | |
1550 | = note: expected type `bool` | |
60c5eb7d | 1551 | found struct `std::ops::Range<_>` |
dc9dc135 XL |
1552 | |
1553 | error[E0308]: mismatched types | |
064997fb | 1554 | --> $DIR/disallowed-positions.rs:171:8 |
dc9dc135 XL |
1555 | | |
1556 | LL | if let Range { start: _, end: _ } = true..true && false {} | |
60c5eb7d | 1557 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
1558 | | |
1559 | = note: expected type `bool` | |
60c5eb7d | 1560 | found struct `std::ops::Range<bool>` |
dc9dc135 XL |
1561 | |
1562 | error[E0308]: mismatched types | |
064997fb | 1563 | --> $DIR/disallowed-positions.rs:175:12 |
dc9dc135 XL |
1564 | | |
1565 | LL | if let Range { start: _, end: _ } = true..true || false {} | |
dfeec247 | 1566 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool` |
dc9dc135 | 1567 | | | |
60c5eb7d | 1568 | | expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
1569 | | |
1570 | = note: expected type `bool` | |
60c5eb7d | 1571 | found struct `std::ops::Range<_>` |
dc9dc135 XL |
1572 | |
1573 | error[E0308]: mismatched types | |
064997fb | 1574 | --> $DIR/disallowed-positions.rs:175:8 |
dc9dc135 XL |
1575 | | |
1576 | LL | if let Range { start: _, end: _ } = true..true || false {} | |
60c5eb7d | 1577 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
1578 | | |
1579 | = note: expected type `bool` | |
60c5eb7d | 1580 | found struct `std::ops::Range<bool>` |
dc9dc135 XL |
1581 | |
1582 | error[E0308]: mismatched types | |
064997fb | 1583 | --> $DIR/disallowed-positions.rs:182:12 |
dc9dc135 XL |
1584 | | |
1585 | LL | if let Range { start: F, end } = F..|| true {} | |
a2a8927a XL |
1586 | | ^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `fn() -> bool` |
1587 | | | | |
1588 | | expected fn pointer, found struct `std::ops::Range` | |
dc9dc135 | 1589 | | |
60c5eb7d XL |
1590 | = note: expected fn pointer `fn() -> bool` |
1591 | found struct `std::ops::Range<_>` | |
dc9dc135 XL |
1592 | |
1593 | error[E0308]: mismatched types | |
064997fb | 1594 | --> $DIR/disallowed-positions.rs:182:41 |
dc9dc135 XL |
1595 | | |
1596 | LL | if let Range { start: F, end } = F..|| true {} | |
60c5eb7d | 1597 | | ^^^^^^^ expected `bool`, found closure |
dc9dc135 XL |
1598 | | |
1599 | = note: expected type `bool` | |
064997fb | 1600 | found closure `[closure@$DIR/disallowed-positions.rs:182:41: 182:43]` |
923072b8 FG |
1601 | help: use parentheses to call this closure |
1602 | | | |
1603 | LL | if let Range { start: F, end } = F..(|| true)() {} | |
1604 | | + +++ | |
dc9dc135 XL |
1605 | |
1606 | error[E0308]: mismatched types | |
064997fb | 1607 | --> $DIR/disallowed-positions.rs:182:8 |
dc9dc135 XL |
1608 | | |
1609 | LL | if let Range { start: F, end } = F..|| true {} | |
60c5eb7d | 1610 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
1611 | | |
1612 | = note: expected type `bool` | |
60c5eb7d | 1613 | found struct `std::ops::Range<bool>` |
dc9dc135 XL |
1614 | |
1615 | error[E0308]: mismatched types | |
064997fb | 1616 | --> $DIR/disallowed-positions.rs:190:12 |
dc9dc135 XL |
1617 | | |
1618 | LL | if let Range { start: true, end } = t..&&false {} | |
dfeec247 | 1619 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `&&bool` |
dc9dc135 | 1620 | | | |
60c5eb7d | 1621 | | expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
1622 | | |
1623 | = note: expected type `bool` | |
60c5eb7d | 1624 | found struct `std::ops::Range<_>` |
dc9dc135 XL |
1625 | |
1626 | error[E0308]: mismatched types | |
064997fb | 1627 | --> $DIR/disallowed-positions.rs:190:44 |
dc9dc135 XL |
1628 | | |
1629 | LL | if let Range { start: true, end } = t..&&false {} | |
60c5eb7d | 1630 | | ^^^^^^^ expected `bool`, found `&&bool` |
5e7ed085 FG |
1631 | | |
1632 | help: consider removing the `&&` | |
1633 | | | |
1634 | LL - if let Range { start: true, end } = t..&&false {} | |
1635 | LL + if let Range { start: true, end } = t..false {} | |
923072b8 | 1636 | | |
dc9dc135 XL |
1637 | |
1638 | error[E0308]: mismatched types | |
064997fb | 1639 | --> $DIR/disallowed-positions.rs:190:8 |
dc9dc135 XL |
1640 | | |
1641 | LL | if let Range { start: true, end } = t..&&false {} | |
60c5eb7d | 1642 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
1643 | | |
1644 | = note: expected type `bool` | |
60c5eb7d | 1645 | found struct `std::ops::Range<bool>` |
dc9dc135 | 1646 | |
1b1a35ee | 1647 | error[E0277]: the `?` operator can only be applied to values that implement `Try` |
064997fb | 1648 | --> $DIR/disallowed-positions.rs:128:20 |
dc9dc135 XL |
1649 | | |
1650 | LL | if let 0 = 0? {} | |
1651 | | ^^ the `?` operator cannot be applied to type `{integer}` | |
1652 | | | |
1b1a35ee | 1653 | = help: the trait `Try` is not implemented for `{integer}` |
dc9dc135 XL |
1654 | |
1655 | error[E0308]: mismatched types | |
064997fb | 1656 | --> $DIR/disallowed-positions.rs:202:11 |
dc9dc135 XL |
1657 | | |
1658 | LL | while &let 0 = 0 {} | |
94222f64 XL |
1659 | | ^^^^^^^^^^ expected `bool`, found `&bool` |
1660 | | | |
1661 | help: consider removing the borrow | |
1662 | | | |
1663 | LL - while &let 0 = 0 {} | |
1664 | LL + while let 0 = 0 {} | |
923072b8 | 1665 | | |
dc9dc135 XL |
1666 | |
1667 | error[E0614]: type `bool` cannot be dereferenced | |
064997fb | 1668 | --> $DIR/disallowed-positions.rs:210:11 |
dc9dc135 XL |
1669 | | |
1670 | LL | while *let 0 = 0 {} | |
1671 | | ^^^^^^^^^^ | |
1672 | ||
1673 | error[E0600]: cannot apply unary operator `-` to type `bool` | |
064997fb | 1674 | --> $DIR/disallowed-positions.rs:214:11 |
dc9dc135 XL |
1675 | | |
1676 | LL | while -let 0 = 0 {} | |
1677 | | ^^^^^^^^^^ cannot apply unary operator `-` | |
dc9dc135 | 1678 | |
1b1a35ee | 1679 | error[E0277]: the `?` operator can only be applied to values that implement `Try` |
064997fb | 1680 | --> $DIR/disallowed-positions.rs:224:11 |
dc9dc135 XL |
1681 | | |
1682 | LL | while (let 0 = 0)? {} | |
1683 | | ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool` | |
1684 | | | |
1b1a35ee | 1685 | = help: the trait `Try` is not implemented for `bool` |
dc9dc135 | 1686 | |
17df50a5 | 1687 | error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) |
064997fb | 1688 | --> $DIR/disallowed-positions.rs:224:22 |
dc9dc135 | 1689 | | |
f2b60f7d FG |
1690 | LL | fn nested_within_while_expr() { |
1691 | | ----------------------------- this function should return `Result` or `Option` to accept `?` | |
1692 | ... | |
1693 | LL | while (let 0 = 0)? {} | |
1694 | | ^ cannot use the `?` operator in a function that returns `()` | |
dc9dc135 | 1695 | | |
17df50a5 | 1696 | = help: the trait `FromResidual<_>` is not implemented for `()` |
dc9dc135 XL |
1697 | |
1698 | error[E0308]: mismatched types | |
064997fb | 1699 | --> $DIR/disallowed-positions.rs:244:11 |
dc9dc135 XL |
1700 | | |
1701 | LL | while x = let 0 = 0 {} | |
1b1a35ee XL |
1702 | | ^^^^^^^^^^^^^ expected `bool`, found `()` |
1703 | | | |
1704 | help: you might have meant to compare for equality | |
1705 | | | |
1706 | LL | while x == let 0 = 0 {} | |
94222f64 | 1707 | | ~~ |
dc9dc135 XL |
1708 | |
1709 | error[E0308]: mismatched types | |
064997fb | 1710 | --> $DIR/disallowed-positions.rs:249:11 |
dc9dc135 XL |
1711 | | |
1712 | LL | while true..(let 0 = 0) {} | |
60c5eb7d | 1713 | | ^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
1714 | | |
1715 | = note: expected type `bool` | |
60c5eb7d | 1716 | found struct `std::ops::Range<bool>` |
dc9dc135 XL |
1717 | |
1718 | error[E0308]: mismatched types | |
064997fb | 1719 | --> $DIR/disallowed-positions.rs:253:11 |
dc9dc135 XL |
1720 | | |
1721 | LL | while ..(let 0 = 0) {} | |
1b1a35ee | 1722 | | ^^^^^^^^^^^^^ expected `bool`, found struct `RangeTo` |
dc9dc135 XL |
1723 | | |
1724 | = note: expected type `bool` | |
1b1a35ee | 1725 | found struct `RangeTo<bool>` |
dc9dc135 XL |
1726 | |
1727 | error[E0308]: mismatched types | |
064997fb | 1728 | --> $DIR/disallowed-positions.rs:257:11 |
dc9dc135 XL |
1729 | | |
1730 | LL | while (let 0 = 0).. {} | |
1b1a35ee | 1731 | | ^^^^^^^^^^^^^ expected `bool`, found struct `RangeFrom` |
dc9dc135 XL |
1732 | | |
1733 | = note: expected type `bool` | |
1b1a35ee | 1734 | found struct `RangeFrom<bool>` |
dc9dc135 XL |
1735 | |
1736 | error[E0308]: mismatched types | |
064997fb | 1737 | --> $DIR/disallowed-positions.rs:263:15 |
dc9dc135 XL |
1738 | | |
1739 | LL | while let Range { start: _, end: _ } = true..true && false {} | |
dfeec247 | 1740 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool` |
dc9dc135 | 1741 | | | |
60c5eb7d | 1742 | | expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
1743 | | |
1744 | = note: expected type `bool` | |
60c5eb7d | 1745 | found struct `std::ops::Range<_>` |
dc9dc135 XL |
1746 | |
1747 | error[E0308]: mismatched types | |
064997fb | 1748 | --> $DIR/disallowed-positions.rs:263:11 |
dc9dc135 XL |
1749 | | |
1750 | LL | while let Range { start: _, end: _ } = true..true && false {} | |
60c5eb7d | 1751 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
1752 | | |
1753 | = note: expected type `bool` | |
60c5eb7d | 1754 | found struct `std::ops::Range<bool>` |
dc9dc135 XL |
1755 | |
1756 | error[E0308]: mismatched types | |
064997fb | 1757 | --> $DIR/disallowed-positions.rs:267:15 |
dc9dc135 XL |
1758 | | |
1759 | LL | while let Range { start: _, end: _ } = true..true || false {} | |
dfeec247 | 1760 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool` |
dc9dc135 | 1761 | | | |
60c5eb7d | 1762 | | expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
1763 | | |
1764 | = note: expected type `bool` | |
60c5eb7d | 1765 | found struct `std::ops::Range<_>` |
dc9dc135 XL |
1766 | |
1767 | error[E0308]: mismatched types | |
064997fb | 1768 | --> $DIR/disallowed-positions.rs:267:11 |
dc9dc135 XL |
1769 | | |
1770 | LL | while let Range { start: _, end: _ } = true..true || false {} | |
60c5eb7d | 1771 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
1772 | | |
1773 | = note: expected type `bool` | |
60c5eb7d | 1774 | found struct `std::ops::Range<bool>` |
dc9dc135 XL |
1775 | |
1776 | error[E0308]: mismatched types | |
064997fb | 1777 | --> $DIR/disallowed-positions.rs:274:15 |
dc9dc135 XL |
1778 | | |
1779 | LL | while let Range { start: F, end } = F..|| true {} | |
a2a8927a XL |
1780 | | ^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `fn() -> bool` |
1781 | | | | |
1782 | | expected fn pointer, found struct `std::ops::Range` | |
dc9dc135 | 1783 | | |
60c5eb7d XL |
1784 | = note: expected fn pointer `fn() -> bool` |
1785 | found struct `std::ops::Range<_>` | |
dc9dc135 XL |
1786 | |
1787 | error[E0308]: mismatched types | |
064997fb | 1788 | --> $DIR/disallowed-positions.rs:274:44 |
dc9dc135 XL |
1789 | | |
1790 | LL | while let Range { start: F, end } = F..|| true {} | |
60c5eb7d | 1791 | | ^^^^^^^ expected `bool`, found closure |
dc9dc135 XL |
1792 | | |
1793 | = note: expected type `bool` | |
064997fb | 1794 | found closure `[closure@$DIR/disallowed-positions.rs:274:44: 274:46]` |
923072b8 FG |
1795 | help: use parentheses to call this closure |
1796 | | | |
1797 | LL | while let Range { start: F, end } = F..(|| true)() {} | |
1798 | | + +++ | |
dc9dc135 XL |
1799 | |
1800 | error[E0308]: mismatched types | |
064997fb | 1801 | --> $DIR/disallowed-positions.rs:274:11 |
dc9dc135 XL |
1802 | | |
1803 | LL | while let Range { start: F, end } = F..|| true {} | |
60c5eb7d | 1804 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
1805 | | |
1806 | = note: expected type `bool` | |
60c5eb7d | 1807 | found struct `std::ops::Range<bool>` |
dc9dc135 XL |
1808 | |
1809 | error[E0308]: mismatched types | |
064997fb | 1810 | --> $DIR/disallowed-positions.rs:282:15 |
dc9dc135 XL |
1811 | | |
1812 | LL | while let Range { start: true, end } = t..&&false {} | |
dfeec247 | 1813 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `&&bool` |
dc9dc135 | 1814 | | | |
60c5eb7d | 1815 | | expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
1816 | | |
1817 | = note: expected type `bool` | |
60c5eb7d | 1818 | found struct `std::ops::Range<_>` |
dc9dc135 XL |
1819 | |
1820 | error[E0308]: mismatched types | |
064997fb | 1821 | --> $DIR/disallowed-positions.rs:282:47 |
dc9dc135 XL |
1822 | | |
1823 | LL | while let Range { start: true, end } = t..&&false {} | |
60c5eb7d | 1824 | | ^^^^^^^ expected `bool`, found `&&bool` |
5e7ed085 FG |
1825 | | |
1826 | help: consider removing the `&&` | |
1827 | | | |
1828 | LL - while let Range { start: true, end } = t..&&false {} | |
1829 | LL + while let Range { start: true, end } = t..false {} | |
923072b8 | 1830 | | |
dc9dc135 XL |
1831 | |
1832 | error[E0308]: mismatched types | |
064997fb | 1833 | --> $DIR/disallowed-positions.rs:282:11 |
dc9dc135 XL |
1834 | | |
1835 | LL | while let Range { start: true, end } = t..&&false {} | |
60c5eb7d | 1836 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
1837 | | |
1838 | = note: expected type `bool` | |
60c5eb7d | 1839 | found struct `std::ops::Range<bool>` |
dc9dc135 | 1840 | |
1b1a35ee | 1841 | error[E0277]: the `?` operator can only be applied to values that implement `Try` |
064997fb | 1842 | --> $DIR/disallowed-positions.rs:220:23 |
dc9dc135 XL |
1843 | | |
1844 | LL | while let 0 = 0? {} | |
1845 | | ^^ the `?` operator cannot be applied to type `{integer}` | |
1846 | | | |
1b1a35ee | 1847 | = help: the trait `Try` is not implemented for `{integer}` |
dc9dc135 XL |
1848 | |
1849 | error[E0614]: type `bool` cannot be dereferenced | |
064997fb | 1850 | --> $DIR/disallowed-positions.rs:311:5 |
dc9dc135 XL |
1851 | | |
1852 | LL | *let 0 = 0; | |
1853 | | ^^^^^^^^^^ | |
1854 | ||
1855 | error[E0600]: cannot apply unary operator `-` to type `bool` | |
064997fb | 1856 | --> $DIR/disallowed-positions.rs:315:5 |
dc9dc135 XL |
1857 | | |
1858 | LL | -let 0 = 0; | |
1859 | | ^^^^^^^^^^ cannot apply unary operator `-` | |
dc9dc135 | 1860 | |
1b1a35ee | 1861 | error[E0277]: the `?` operator can only be applied to values that implement `Try` |
064997fb | 1862 | --> $DIR/disallowed-positions.rs:325:5 |
dc9dc135 XL |
1863 | | |
1864 | LL | (let 0 = 0)?; | |
1865 | | ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool` | |
1866 | | | |
1b1a35ee | 1867 | = help: the trait `Try` is not implemented for `bool` |
dc9dc135 | 1868 | |
17df50a5 | 1869 | error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) |
064997fb | 1870 | --> $DIR/disallowed-positions.rs:325:16 |
dc9dc135 | 1871 | | |
f2b60f7d FG |
1872 | LL | fn outside_if_and_while_expr() { |
1873 | | ------------------------------ this function should return `Result` or `Option` to accept `?` | |
1874 | ... | |
1875 | LL | (let 0 = 0)?; | |
1876 | | ^ cannot use the `?` operator in a function that returns `()` | |
dc9dc135 | 1877 | | |
17df50a5 | 1878 | = help: the trait `FromResidual<_>` is not implemented for `()` |
dc9dc135 XL |
1879 | |
1880 | error[E0308]: mismatched types | |
064997fb | 1881 | --> $DIR/disallowed-positions.rs:356:10 |
dc9dc135 XL |
1882 | | |
1883 | LL | (let Range { start: _, end: _ } = true..true || false); | |
dfeec247 | 1884 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool` |
dc9dc135 | 1885 | | | |
60c5eb7d | 1886 | | expected `bool`, found struct `std::ops::Range` |
dc9dc135 XL |
1887 | | |
1888 | = note: expected type `bool` | |
60c5eb7d | 1889 | found struct `std::ops::Range<_>` |
dc9dc135 XL |
1890 | |
1891 | error[E0308]: mismatched types | |
064997fb | 1892 | --> $DIR/disallowed-positions.rs:379:5 |
dc9dc135 XL |
1893 | | |
1894 | LL | fn outside_if_and_while_expr() { | |
1895 | | - help: try adding a return type: `-> &bool` | |
1896 | ... | |
1897 | LL | &let 0 = 0 | |
60c5eb7d | 1898 | | ^^^^^^^^^^ expected `()`, found `&bool` |
dc9dc135 | 1899 | |
1b1a35ee | 1900 | error[E0277]: the `?` operator can only be applied to values that implement `Try` |
064997fb | 1901 | --> $DIR/disallowed-positions.rs:321:17 |
dc9dc135 XL |
1902 | | |
1903 | LL | let 0 = 0?; | |
1904 | | ^^ the `?` operator cannot be applied to type `{integer}` | |
1905 | | | |
1b1a35ee | 1906 | = help: the trait `Try` is not implemented for `{integer}` |
dc9dc135 | 1907 | |
064997fb | 1908 | error: aborting due to 215 previous errors |
dc9dc135 | 1909 | |
f035d41b | 1910 | Some errors have detailed explanations: E0277, E0308, E0600, E0614. |
60c5eb7d | 1911 | For more information about an error, try `rustc --explain E0277`. |