Commit 0c36cd3
committed
Auto merge of #65293 - tmandry:turbo-expander, r=<try>
Optimize `try_expand_impl_trait_type`
A lot of time was being spent expanding some large `impl Future` types in fuchsia. This PR takes the number of types being visited in one expansion from >3 billion to about a thousand, and eliminates the compile time regression in #65147 (in fact, compile times are better than they were before).
Thanks to @matthewjasper for suggesting this change.
Fixes #65147.
r? @matthewjasper,@nikomatsakisFile tree
2 files changed
+20
-7
lines changed- src
- librustc/ty
- test/ui/impl-trait
2 files changed
+20
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
697 | 697 | | |
698 | 698 | | |
699 | 699 | | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
700 | 703 | | |
701 | 704 | | |
702 | 705 | | |
| |||
713 | 716 | | |
714 | 717 | | |
715 | 718 | | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
720 | 730 | | |
721 | 731 | | |
722 | 732 | | |
| |||
735 | 745 | | |
736 | 746 | | |
737 | 747 | | |
738 | | - | |
| 748 | + | |
739 | 749 | | |
| 750 | + | |
| 751 | + | |
740 | 752 | | |
741 | 753 | | |
742 | 754 | | |
743 | 755 | | |
744 | 756 | | |
745 | 757 | | |
| 758 | + | |
746 | 759 | | |
747 | 760 | | |
748 | 761 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
0 commit comments