This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 993d8ae
committed
Auto merge of rust-lang#12567 - Alexendoo:format-args-storage, r=flip1995
Fix `FormatArgs` storage when `-Zthreads` > 1
Fixes rust-lang#11886
The initial way I thought of was a little gross so I never opened a PR for it, I thought of a nicer way today that no longer involves any `thread_local`s or `static`s
`rustc_data_strucutres::sync::{Lrc, OnceLock}` implement `DynSend` + `DynSync` so we can pass them to the lint passes that need the storage
changelog: none
r? `@flip1995`File tree
10 files changed
+151
-94
lines changed- clippy_lints/src
- methods
- utils
- clippy_utils/src
10 files changed
+151
-94
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
42 | 52 | | |
43 | 53 | | |
44 | 54 | | |
| |||
57 | 67 | | |
58 | 68 | | |
59 | 69 | | |
60 | | - | |
| 70 | + | |
61 | 71 | | |
62 | 72 | | |
63 | 73 | | |
| |||
83 | 93 | | |
84 | 94 | | |
85 | 95 | | |
86 | | - | |
| 96 | + | |
87 | 97 | | |
88 | 98 | | |
89 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
43 | 54 | | |
44 | 55 | | |
45 | 56 | | |
46 | 57 | | |
47 | 58 | | |
48 | | - | |
| 59 | + | |
49 | 60 | | |
50 | 61 | | |
51 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
170 | 171 | | |
| 172 | + | |
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
177 | | - | |
| 179 | + | |
178 | 180 | | |
| 181 | + | |
179 | 182 | | |
180 | 183 | | |
181 | 184 | | |
| |||
186 | 189 | | |
187 | 190 | | |
188 | 191 | | |
189 | | - | |
| 192 | + | |
190 | 193 | | |
191 | 194 | | |
192 | 195 | | |
193 | 196 | | |
194 | 197 | | |
195 | | - | |
| 198 | + | |
196 | 199 | | |
197 | 200 | | |
198 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
107 | | - | |
| 108 | + | |
108 | 109 | | |
| 110 | + | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
| |||
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| 134 | + | |
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
| |||
141 | 144 | | |
142 | 145 | | |
143 | 146 | | |
| 147 | + | |
144 | 148 | | |
145 | 149 | | |
146 | 150 | | |
| |||
175 | 179 | | |
176 | 180 | | |
177 | 181 | | |
178 | | - | |
| 182 | + | |
179 | 183 | | |
180 | 184 | | |
181 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | 63 | | |
69 | 64 | | |
70 | 65 | | |
| |||
384 | 379 | | |
385 | 380 | | |
386 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
387 | 386 | | |
388 | 387 | | |
389 | 388 | | |
| |||
615 | 614 | | |
616 | 615 | | |
617 | 616 | | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
618 | 625 | | |
619 | 626 | | |
620 | 627 | | |
| |||
655 | 662 | | |
656 | 663 | | |
657 | 664 | | |
658 | | - | |
659 | 665 | | |
660 | 666 | | |
661 | 667 | | |
| |||
697 | 703 | | |
698 | 704 | | |
699 | 705 | | |
| 706 | + | |
700 | 707 | | |
701 | 708 | | |
702 | 709 | | |
703 | 710 | | |
704 | 711 | | |
705 | 712 | | |
706 | 713 | | |
| 714 | + | |
707 | 715 | | |
708 | 716 | | |
709 | 717 | | |
| |||
768 | 776 | | |
769 | 777 | | |
770 | 778 | | |
771 | | - | |
| 779 | + | |
| 780 | + | |
772 | 781 | | |
773 | 782 | | |
774 | 783 | | |
| |||
792 | 801 | | |
793 | 802 | | |
794 | 803 | | |
795 | | - | |
| 804 | + | |
| 805 | + | |
796 | 806 | | |
797 | 807 | | |
798 | 808 | | |
| |||
834 | 844 | | |
835 | 845 | | |
836 | 846 | | |
837 | | - | |
| 847 | + | |
| 848 | + | |
838 | 849 | | |
839 | 850 | | |
840 | 851 | | |
| |||
960 | 971 | | |
961 | 972 | | |
962 | 973 | | |
963 | | - | |
964 | | - | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
965 | 982 | | |
966 | 983 | | |
967 | 984 | | |
| |||
972 | 989 | | |
973 | 990 | | |
974 | 991 | | |
975 | | - | |
| 992 | + | |
| 993 | + | |
976 | 994 | | |
977 | 995 | | |
978 | 996 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
137 | | - | |
| 138 | + | |
138 | 139 | | |
139 | | - | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| |||
4087 | 4088 | | |
4088 | 4089 | | |
4089 | 4090 | | |
| 4091 | + | |
4090 | 4092 | | |
4091 | 4093 | | |
4092 | 4094 | | |
4093 | 4095 | | |
4094 | 4096 | | |
4095 | 4097 | | |
| 4098 | + | |
4096 | 4099 | | |
4097 | 4100 | | |
4098 | 4101 | | |
| |||
4103 | 4106 | | |
4104 | 4107 | | |
4105 | 4108 | | |
| 4109 | + | |
4106 | 4110 | | |
4107 | 4111 | | |
4108 | 4112 | | |
| |||
4112 | 4116 | | |
4113 | 4117 | | |
4114 | 4118 | | |
| 4119 | + | |
4115 | 4120 | | |
4116 | 4121 | | |
4117 | 4122 | | |
| |||
4281 | 4286 | | |
4282 | 4287 | | |
4283 | 4288 | | |
4284 | | - | |
| 4289 | + | |
| 4290 | + | |
| 4291 | + | |
| 4292 | + | |
| 4293 | + | |
| 4294 | + | |
| 4295 | + | |
| 4296 | + | |
| 4297 | + | |
4285 | 4298 | | |
4286 | 4299 | | |
4287 | 4300 | | |
| |||
0 commit comments