This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit f2d6770
authored
Rollup merge of rust-lang#94146 - est31:let_else, r=cjgillot
Adopt let else in more places
Continuation of rust-lang#89933, rust-lang#91018, rust-lang#91481, rust-lang#93046, rust-lang#93590, rust-lang#94011.
I have extended my clippy lint to also recognize tuple passing and match statements. The diff caused by fixing it is way above 1 thousand lines. Thus, I split it up into multiple pull requests to make reviewing easier. This is the biggest of these PRs and handles the changes outside of rustdoc, rustc_typeck, rustc_const_eval, rustc_trait_selection, which were handled in PRs rust-lang#94139, rust-lang#94142, rust-lang#94143, rust-lang#94144.File tree
132 files changed
+539
-881
lines changed- compiler
- rustc_ast_lowering/src
- rustc_ast_passes/src
- rustc_attr/src
- rustc_borrowck/src
- diagnostics
- region_infer
- type_check
- rustc_builtin_macros/src
- deriving
- cmp
- rustc_codegen_llvm/src
- back
- debuginfo
- rustc_codegen_ssa/src
- back
- mir
- rustc_data_structures/src
- binary_search_util
- rustc_driver/src
- rustc_errors/src
- rustc_expand/src
- rustc_hir/src
- rustc_incremental/src/persist
- rustc_index/src
- rustc_infer/src/infer
- error_reporting/nice_region_error
- lexical_region_resolve
- rustc_interface/src
- rustc_lint/src
- rustc_metadata/src
- rmeta/decoder
- rustc_middle/src
- middle
- mir
- ty
- print
- rustc_mir_build/src
- build
- matches
- thir
- cx
- pattern
- rustc_mir_dataflow/src
- framework
- impls
- rustc_mir_transform/src
- inline
- rustc_monomorphize/src
- rustc_parse/src
- lexer
- parser
- rustc_passes/src
- rustc_resolve/src
- late
- rustc_save_analysis/src
- rustc_serialize/src
- rustc_session/src
- rustc_span/src
- rustc_target/src
- abi
- rustc_traits/src
- chalk
- rustc_ty_utils/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
132 files changed
+539
-881
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
343 | | - | |
344 | | - | |
| 342 | + | |
| 343 | + | |
345 | 344 | | |
346 | 345 | | |
347 | 346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
334 | | - | |
335 | | - | |
| 333 | + | |
| 334 | + | |
336 | 335 | | |
337 | 336 | | |
338 | 337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1376 | 1376 | | |
1377 | 1377 | | |
1378 | 1378 | | |
1379 | | - | |
1380 | | - | |
1381 | | - | |
| 1379 | + | |
| 1380 | + | |
1382 | 1381 | | |
1383 | 1382 | | |
1384 | 1383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
485 | | - | |
486 | | - | |
487 | | - | |
| 485 | + | |
| 486 | + | |
488 | 487 | | |
489 | 488 | | |
490 | 489 | | |
| |||
504 | 503 | | |
505 | 504 | | |
506 | 505 | | |
507 | | - | |
508 | | - | |
509 | | - | |
| 506 | + | |
| 507 | + | |
510 | 508 | | |
511 | 509 | | |
512 | 510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
| 60 | + | |
| 61 | + | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
570 | 567 | | |
571 | 568 | | |
572 | 569 | | |
| |||
669 | 666 | | |
670 | 667 | | |
671 | 668 | | |
672 | | - | |
673 | | - | |
674 | | - | |
| 669 | + | |
| 670 | + | |
675 | 671 | | |
676 | 672 | | |
677 | 673 | | |
| |||
Lines changed: 7 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2071 | 2071 | | |
2072 | 2072 | | |
2073 | 2073 | | |
2074 | | - | |
2075 | | - | |
2076 | | - | |
2077 | | - | |
2078 | | - | |
| 2074 | + | |
| 2075 | + | |
2079 | 2076 | | |
2080 | 2077 | | |
2081 | 2078 | | |
2082 | 2079 | | |
2083 | 2080 | | |
2084 | 2081 | | |
2085 | 2082 | | |
2086 | | - | |
2087 | | - | |
2088 | | - | |
2089 | | - | |
| 2083 | + | |
| 2084 | + | |
2090 | 2085 | | |
2091 | 2086 | | |
2092 | 2087 | | |
| |||
2138 | 2133 | | |
2139 | 2134 | | |
2140 | 2135 | | |
2141 | | - | |
2142 | | - | |
2143 | | - | |
2144 | | - | |
| 2136 | + | |
2145 | 2137 | | |
2146 | 2138 | | |
2147 | 2139 | | |
| |||
2189 | 2181 | | |
2190 | 2182 | | |
2191 | 2183 | | |
2192 | | - | |
2193 | | - | |
2194 | | - | |
2195 | | - | |
2196 | | - | |
| 2184 | + | |
| 2185 | + | |
2197 | 2186 | | |
2198 | 2187 | | |
2199 | 2188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
660 | 657 | | |
661 | 658 | | |
662 | 659 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
| 447 | + | |
451 | 448 | | |
452 | 449 | | |
453 | 450 | | |
| |||
787 | 784 | | |
788 | 785 | | |
789 | 786 | | |
790 | | - | |
791 | | - | |
792 | | - | |
| 787 | + | |
| 788 | + | |
793 | 789 | | |
794 | 790 | | |
795 | 791 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
192 | | - | |
| 191 | + | |
193 | 192 | | |
194 | | - | |
| 193 | + | |
195 | 194 | | |
196 | 195 | | |
197 | 196 | | |
| |||
0 commit comments