Commit 8d94899
authored
Unrolled build for #150548
Rollup merge of #150548 - dianne:temp-scope-extension-loop-rewrite, r=BoxyUwU
`region_scope_tree`: Rewrite a `loop` as tail recursion
This addresses #146098 (comment), hopefully making `record_subexpr_extended_temp_scopes` a bit more legible.
I removed a `debug!` in the process, since the function it calls every iteration, [`ScopeTree::record_extended_temp_scope`](https://github.com/rust-lang/rust/blob/2848c2ebe9a8a604cd63455263299d7258bc8252/compiler/rustc_middle/src/middle/region.rs#L264-L271), does the same `debug!`. Keeping the behavior of having an additional `debug!` for the top-level expression would hurt legibility, and having a duplicate `debug!` at each iteration seems excessive. No information is lost from the debug output, so I think it's fine to just have the inner `debug!`s.
r? BoxyUwU or anyone1 file changed
+14
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
701 | 701 | | |
702 | 702 | | |
703 | 703 | | |
704 | | - | |
| 704 | + | |
705 | 705 | | |
706 | 706 | | |
707 | | - | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
708 | 712 | | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
| 713 | + | |
715 | 714 | | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | | - | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
728 | 721 | | |
| 722 | + | |
729 | 723 | | |
730 | 724 | | |
731 | 725 | | |
| |||
0 commit comments