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