This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 579ad25
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
12 files changed
+102
-4
lines changed- library/alloc/src
- collections/vec_deque
- vec
12 files changed
+102
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| 121 | + | |
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
| |||
480 | 482 | | |
481 | 483 | | |
482 | 484 | | |
| 485 | + | |
483 | 486 | | |
484 | 487 | | |
485 | 488 | | |
| |||
560 | 563 | | |
561 | 564 | | |
562 | 565 | | |
| 566 | + | |
563 | 567 | | |
564 | 568 | | |
565 | 569 | | |
| |||
615 | 619 | | |
616 | 620 | | |
617 | 621 | | |
| 622 | + | |
618 | 623 | | |
619 | 624 | | |
620 | 625 | | |
| |||
779 | 784 | | |
780 | 785 | | |
781 | 786 | | |
| 787 | + | |
782 | 788 | | |
783 | 789 | | |
784 | 790 | | |
| |||
808 | 814 | | |
809 | 815 | | |
810 | 816 | | |
| 817 | + | |
811 | 818 | | |
812 | 819 | | |
813 | 820 | | |
| |||
939 | 946 | | |
940 | 947 | | |
941 | 948 | | |
| 949 | + | |
942 | 950 | | |
943 | 951 | | |
944 | 952 | | |
| |||
964 | 972 | | |
965 | 973 | | |
966 | 974 | | |
| 975 | + | |
967 | 976 | | |
968 | 977 | | |
969 | 978 | | |
| |||
1729 | 1738 | | |
1730 | 1739 | | |
1731 | 1740 | | |
| 1741 | + | |
1732 | 1742 | | |
1733 | 1743 | | |
1734 | 1744 | | |
| |||
1756 | 1766 | | |
1757 | 1767 | | |
1758 | 1768 | | |
| 1769 | + | |
1759 | 1770 | | |
1760 | 1771 | | |
1761 | 1772 | | |
| |||
1865 | 1876 | | |
1866 | 1877 | | |
1867 | 1878 | | |
| 1879 | + | |
1868 | 1880 | | |
1869 | 1881 | | |
1870 | 1882 | | |
| |||
1968 | 1980 | | |
1969 | 1981 | | |
1970 | 1982 | | |
| 1983 | + | |
1971 | 1984 | | |
1972 | 1985 | | |
1973 | 1986 | | |
| |||
2034 | 2047 | | |
2035 | 2048 | | |
2036 | 2049 | | |
| 2050 | + | |
2037 | 2051 | | |
2038 | 2052 | | |
2039 | 2053 | | |
| |||
2156 | 2170 | | |
2157 | 2171 | | |
2158 | 2172 | | |
| 2173 | + | |
2159 | 2174 | | |
2160 | 2175 | | |
2161 | 2176 | | |
| |||
2194 | 2209 | | |
2195 | 2210 | | |
2196 | 2211 | | |
| 2212 | + | |
2197 | 2213 | | |
2198 | 2214 | | |
2199 | 2215 | | |
| |||
2740 | 2756 | | |
2741 | 2757 | | |
2742 | 2758 | | |
| 2759 | + | |
2743 | 2760 | | |
2744 | 2761 | | |
2745 | 2762 | | |
| |||
2859 | 2876 | | |
2860 | 2877 | | |
2861 | 2878 | | |
| 2879 | + | |
2862 | 2880 | | |
2863 | 2881 | | |
2864 | 2882 | | |
| |||
2898 | 2916 | | |
2899 | 2917 | | |
2900 | 2918 | | |
| 2919 | + | |
2901 | 2920 | | |
2902 | 2921 | | |
2903 | 2922 | | |
2904 | 2923 | | |
2905 | 2924 | | |
| 2925 | + | |
2906 | 2926 | | |
2907 | 2927 | | |
2908 | 2928 | | |
2909 | 2929 | | |
2910 | 2930 | | |
| 2931 | + | |
2911 | 2932 | | |
2912 | 2933 | | |
2913 | 2934 | | |
2914 | 2935 | | |
2915 | 2936 | | |
2916 | 2937 | | |
2917 | 2938 | | |
| 2939 | + | |
2918 | 2940 | | |
2919 | 2941 | | |
2920 | 2942 | | |
2921 | 2943 | | |
2922 | 2944 | | |
| 2945 | + | |
2923 | 2946 | | |
2924 | 2947 | | |
2925 | 2948 | | |
2926 | 2949 | | |
2927 | 2950 | | |
| 2951 | + | |
2928 | 2952 | | |
2929 | 2953 | | |
2930 | 2954 | | |
| |||
3014 | 3038 | | |
3015 | 3039 | | |
3016 | 3040 | | |
| 3041 | + | |
3017 | 3042 | | |
3018 | 3043 | | |
3019 | 3044 | | |
| |||
| 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 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
| 91 | + | |
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
| |||
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
| 109 | + | |
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
| |||
111 | 116 | | |
112 | 117 | | |
113 | 118 | | |
| 119 | + | |
114 | 120 | | |
115 | 121 | | |
116 | 122 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| 117 | + | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
| |||
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| 129 | + | |
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
| |||
154 | 157 | | |
155 | 158 | | |
156 | 159 | | |
| 160 | + | |
157 | 161 | | |
158 | 162 | | |
159 | 163 | | |
| |||
172 | 176 | | |
173 | 177 | | |
174 | 178 | | |
| 179 | + | |
175 | 180 | | |
176 | 181 | | |
177 | 182 | | |
| |||
335 | 340 | | |
336 | 341 | | |
337 | 342 | | |
| 343 | + | |
338 | 344 | | |
339 | 345 | | |
340 | 346 | | |
| |||
360 | 366 | | |
361 | 367 | | |
362 | 368 | | |
| 369 | + | |
363 | 370 | | |
364 | 371 | | |
365 | 372 | | |
| |||
396 | 403 | | |
397 | 404 | | |
398 | 405 | | |
| 406 | + | |
399 | 407 | | |
400 | 408 | | |
401 | 409 | | |
| |||
429 | 437 | | |
430 | 438 | | |
431 | 439 | | |
| 440 | + | |
432 | 441 | | |
433 | 442 | | |
434 | 443 | | |
| |||
510 | 519 | | |
511 | 520 | | |
512 | 521 | | |
513 | | - | |
514 | 522 | | |
515 | 523 | | |
516 | 524 | | |
| |||
588 | 596 | | |
589 | 597 | | |
590 | 598 | | |
| 599 | + | |
591 | 600 | | |
592 | 601 | | |
593 | 602 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
| |||
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
| 250 | + | |
249 | 251 | | |
250 | 252 | | |
251 | 253 | | |
| |||
0 commit comments