This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit bf493f5
committed
Auto merge of rust-lang#126557 - GrigorenkoPV:vec_track_caller, r=<try>
Add `#[track_caller]` to allocating methods of `Vec` & `VecDeque`
Part 4 in a lengthy saga.
r? `@joshtriplett` because they were the reviewer the last 3 times.
`@bors` rollup=never "[just in case this has perf effects, Vec is hot](rust-lang#79323 (comment))"
This was first attempted in rust-lang#79323 by `@nvzqz.` It got approval from `@joshtriplett,` but rotted with merge conflicts and got closed.
Then it got picked up by `@Dylan-DPC-zz` in rust-lang#83359. A benchmark was run[^perf], the results (after a bit of thinking[^thinking]) were deemed ok[^ok], but there was a typo[^typo] and the PR was made from a wrong remote in the first place[^remote], so rust-lang#83909 was opened instead.
By the time rust-lang#83909 rolled around, the methods in question had received some optimizations[^optimizations], so another perf run was conducted[^perf2]. The results were ok[^ok2]. There was a suggestion to add regression tests for panic behavior [^tests], but before it could be addressed, the PR fell victim to merge conflicts[^conflicts] and died again[^rip].
3 years have passed, and (from what I can tell) this has not been tried again, so here I am now, reviving this old effort.
Given how much time has passed and the fact that I've also touched `VecDeque` this time, it probably makes sense to
`@bors` try `@rust-timer`
[^perf]: rust-lang#83359 (comment)
[^thinking]: rust-lang#83359 (comment)
[^ok]: rust-lang#83359 (comment)
[^typo]: rust-lang#83359 (comment)
[^remote]: rust-lang#83359 (comment)
[^optimizations]: rust-lang#83909 (comment)
[^perf2]: rust-lang#83909 (comment)
[^ok2]: rust-lang#83909 (comment)
[^tests]: rust-lang#83909 (comment)
[^conflicts]: rust-lang#83909 (comment)
[^rip]: rust-lang#83909 (comment)File tree
14 files changed
+108
-3
lines changed- library/alloc/src
- collections/vec_deque
- vec
- tests/ui/hygiene
14 files changed
+108
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| 117 | + | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
| |||
490 | 492 | | |
491 | 493 | | |
492 | 494 | | |
| 495 | + | |
493 | 496 | | |
494 | 497 | | |
495 | 498 | | |
| |||
570 | 573 | | |
571 | 574 | | |
572 | 575 | | |
| 576 | + | |
573 | 577 | | |
574 | 578 | | |
575 | 579 | | |
| |||
625 | 629 | | |
626 | 630 | | |
627 | 631 | | |
| 632 | + | |
628 | 633 | | |
629 | 634 | | |
630 | 635 | | |
| |||
789 | 794 | | |
790 | 795 | | |
791 | 796 | | |
| 797 | + | |
792 | 798 | | |
793 | 799 | | |
794 | 800 | | |
| |||
818 | 824 | | |
819 | 825 | | |
820 | 826 | | |
| 827 | + | |
821 | 828 | | |
822 | 829 | | |
823 | 830 | | |
| |||
949 | 956 | | |
950 | 957 | | |
951 | 958 | | |
| 959 | + | |
952 | 960 | | |
953 | 961 | | |
954 | 962 | | |
| |||
974 | 982 | | |
975 | 983 | | |
976 | 984 | | |
| 985 | + | |
977 | 986 | | |
978 | 987 | | |
979 | 988 | | |
| |||
1739 | 1748 | | |
1740 | 1749 | | |
1741 | 1750 | | |
| 1751 | + | |
1742 | 1752 | | |
1743 | 1753 | | |
1744 | 1754 | | |
| |||
1766 | 1776 | | |
1767 | 1777 | | |
1768 | 1778 | | |
| 1779 | + | |
1769 | 1780 | | |
1770 | 1781 | | |
1771 | 1782 | | |
| |||
1875 | 1886 | | |
1876 | 1887 | | |
1877 | 1888 | | |
| 1889 | + | |
1878 | 1890 | | |
1879 | 1891 | | |
1880 | 1892 | | |
| |||
1978 | 1990 | | |
1979 | 1991 | | |
1980 | 1992 | | |
| 1993 | + | |
1981 | 1994 | | |
1982 | 1995 | | |
1983 | 1996 | | |
| |||
2044 | 2057 | | |
2045 | 2058 | | |
2046 | 2059 | | |
| 2060 | + | |
2047 | 2061 | | |
2048 | 2062 | | |
2049 | 2063 | | |
| |||
2166 | 2180 | | |
2167 | 2181 | | |
2168 | 2182 | | |
| 2183 | + | |
2169 | 2184 | | |
2170 | 2185 | | |
2171 | 2186 | | |
| |||
2204 | 2219 | | |
2205 | 2220 | | |
2206 | 2221 | | |
| 2222 | + | |
2207 | 2223 | | |
2208 | 2224 | | |
2209 | 2225 | | |
| |||
2750 | 2766 | | |
2751 | 2767 | | |
2752 | 2768 | | |
| 2769 | + | |
2753 | 2770 | | |
2754 | 2771 | | |
2755 | 2772 | | |
| |||
2869 | 2886 | | |
2870 | 2887 | | |
2871 | 2888 | | |
| 2889 | + | |
2872 | 2890 | | |
2873 | 2891 | | |
2874 | 2892 | | |
| |||
2908 | 2926 | | |
2909 | 2927 | | |
2910 | 2928 | | |
| 2929 | + | |
2911 | 2930 | | |
2912 | 2931 | | |
2913 | 2932 | | |
2914 | 2933 | | |
2915 | 2934 | | |
| 2935 | + | |
2916 | 2936 | | |
2917 | 2937 | | |
2918 | 2938 | | |
2919 | 2939 | | |
2920 | 2940 | | |
| 2941 | + | |
2921 | 2942 | | |
2922 | 2943 | | |
2923 | 2944 | | |
| |||
2933 | 2954 | | |
2934 | 2955 | | |
2935 | 2956 | | |
| 2957 | + | |
2936 | 2958 | | |
2937 | 2959 | | |
2938 | 2960 | | |
2939 | 2961 | | |
2940 | 2962 | | |
| 2963 | + | |
2941 | 2964 | | |
2942 | 2965 | | |
2943 | 2966 | | |
2944 | 2967 | | |
2945 | 2968 | | |
| 2969 | + | |
2946 | 2970 | | |
2947 | 2971 | | |
2948 | 2972 | | |
| |||
3040 | 3064 | | |
3041 | 3065 | | |
3042 | 3066 | | |
| 3067 | + | |
3043 | 3068 | | |
3044 | 3069 | | |
3045 | 3070 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| 82 | + | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| |||
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
| 100 | + | |
96 | 101 | | |
97 | 102 | | |
98 | 103 | | |
| |||
102 | 107 | | |
103 | 108 | | |
104 | 109 | | |
| 110 | + | |
105 | 111 | | |
106 | 112 | | |
107 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| 136 | + | |
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
| |||
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| 145 | + | |
143 | 146 | | |
144 | 147 | | |
145 | 148 | | |
| |||
158 | 161 | | |
159 | 162 | | |
160 | 163 | | |
| 164 | + | |
161 | 165 | | |
162 | 166 | | |
163 | 167 | | |
| |||
197 | 201 | | |
198 | 202 | | |
199 | 203 | | |
| 204 | + | |
200 | 205 | | |
201 | 206 | | |
202 | 207 | | |
| |||
218 | 223 | | |
219 | 224 | | |
220 | 225 | | |
| 226 | + | |
221 | 227 | | |
222 | 228 | | |
223 | 229 | | |
| |||
337 | 343 | | |
338 | 344 | | |
339 | 345 | | |
| 346 | + | |
340 | 347 | | |
341 | 348 | | |
342 | 349 | | |
| |||
345 | 352 | | |
346 | 353 | | |
347 | 354 | | |
| 355 | + | |
348 | 356 | | |
349 | 357 | | |
350 | 358 | | |
| |||
372 | 380 | | |
373 | 381 | | |
374 | 382 | | |
| 383 | + | |
375 | 384 | | |
376 | 385 | | |
377 | 386 | | |
| |||
396 | 405 | | |
397 | 406 | | |
398 | 407 | | |
| 408 | + | |
399 | 409 | | |
400 | 410 | | |
401 | 411 | | |
| |||
421 | 431 | | |
422 | 432 | | |
423 | 433 | | |
| 434 | + | |
424 | 435 | | |
425 | 436 | | |
426 | 437 | | |
| |||
445 | 456 | | |
446 | 457 | | |
447 | 458 | | |
| 459 | + | |
448 | 460 | | |
449 | 461 | | |
450 | 462 | | |
| |||
539 | 551 | | |
540 | 552 | | |
541 | 553 | | |
| 554 | + | |
542 | 555 | | |
543 | 556 | | |
544 | 557 | | |
| |||
563 | 576 | | |
564 | 577 | | |
565 | 578 | | |
| 579 | + | |
566 | 580 | | |
567 | 581 | | |
568 | 582 | | |
| |||
586 | 600 | | |
587 | 601 | | |
588 | 602 | | |
| 603 | + | |
589 | 604 | | |
590 | 605 | | |
591 | 606 | | |
| |||
610 | 625 | | |
611 | 626 | | |
612 | 627 | | |
| 628 | + | |
613 | 629 | | |
614 | 630 | | |
615 | 631 | | |
| |||
782 | 798 | | |
783 | 799 | | |
784 | 800 | | |
| 801 | + | |
785 | 802 | | |
786 | 803 | | |
787 | 804 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
0 commit comments