Commit 197898d
authored
Rollup merge of rust-lang#140981 - est31:guard_let_chains_tests, r=petrochenkov
Add match guard let chain drop order and scoping tests
We have a bunch of tests for if let chain drop order, but those tests don't cover match guard chains to the same depth. This PR adds the following tests:
* match guard equivalents of the if let chains tests in the `drop-order-comparisons.rs` test, added by rust-lang#133605.
* match guard equivalent of the `mir_let_chains_drop_order.rs` test, added by rust-lang#107251
* match guard equivalent of `temporary-early-drop.rs`, added by rust-lang#133093
The added tests all have variants for 2021 and 2024, showing that the behavior on both editions matches that of if let chains on 2024.
tracking issue: rust-lang#51114File tree
5 files changed
+269
-48
lines changed- tests/ui
- drop
- mir
- rfcs/rfc-2294-if-let-guard
5 files changed
+269
-48
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
344 | 345 | | |
345 | 346 | | |
346 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
347 | 367 | | |
348 | 368 | | |
349 | 369 | | |
| |||
484 | 504 | | |
485 | 505 | | |
486 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
487 | 526 | | |
488 | 527 | | |
489 | 528 | | |
| |||
502 | 541 | | |
503 | 542 | | |
504 | 543 | | |
| 544 | + | |
505 | 545 | | |
506 | 546 | | |
507 | 547 | | |
508 | 548 | | |
| 549 | + | |
509 | 550 | | |
510 | 551 | | |
511 | 552 | | |
| |||
0 commit comments