This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 2e88e9e
committed
Auto merge of rust-lang#124491 - madsmtm:target_vendor-apple, r=workingjubilee
Use `target_vendor = "apple"` instead of `target_os = "..."`
Use `target_vendor = "apple"` instead of `all(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos", target_os = "visionos")`.
The apple targets are quite close to being identical, with iOS, tvOS, watchOS and visionOS being even closer, so using `target_vendor` when possible makes it clearer when something is actually OS-specific, or just Apple-specific.
Note that `target_vendor` will [be deprecated in the future](rust-lang#100343), but not before an alternative (like `target_family = "apple"`) is available.
While doing this, I found various inconsistencies and small mistakes in the standard library, see the commits for details. Will follow-up with an extra PR for a similar issue that need a bit more discussion. EDIT: rust-lang#124494
Since you've talked about using `target_vendor = "apple"` in the past:
r? workingjubilee
CC `@simlay,` `@thomcc`
`@rustbot` label O-macos O-ios O-tvos O-watchos O-visionosFile tree
21 files changed
+90
-372
lines changed- library
- core/src/ffi
- std/src
- fs
- os/unix/net
- ucred
- sys_common
- sys
- pal/unix
- process
- thread_parking
- sync/condvar
- thread
- src/tools/compiletest/src
21 files changed
+90
-372
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
| 268 | + | |
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
| 365 | + | |
369 | 366 | | |
370 | 367 | | |
371 | 368 | | |
| |||
379 | 376 | | |
380 | 377 | | |
381 | 378 | | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
| 379 | + | |
386 | 380 | | |
387 | 381 | | |
388 | 382 | | |
| |||
399 | 393 | | |
400 | 394 | | |
401 | 395 | | |
402 | | - | |
| 396 | + | |
403 | 397 | | |
404 | 398 | | |
405 | 399 | | |
| |||
425 | 419 | | |
426 | 420 | | |
427 | 421 | | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
| 422 | + | |
432 | 423 | | |
433 | 424 | | |
434 | 425 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1657 | 1657 | | |
1658 | 1658 | | |
1659 | 1659 | | |
1660 | | - | |
1661 | | - | |
1662 | | - | |
1663 | | - | |
1664 | | - | |
1665 | | - | |
1666 | | - | |
1667 | | - | |
| 1660 | + | |
1668 | 1661 | | |
1669 | | - | |
1670 | | - | |
1671 | | - | |
1672 | | - | |
1673 | | - | |
1674 | | - | |
1675 | | - | |
1676 | | - | |
| 1662 | + | |
1677 | 1663 | | |
1678 | 1664 | | |
1679 | 1665 | | |
| |||
1698 | 1684 | | |
1699 | 1685 | | |
1700 | 1686 | | |
1701 | | - | |
1702 | | - | |
1703 | | - | |
1704 | | - | |
1705 | | - | |
1706 | | - | |
1707 | | - | |
1708 | | - | |
| 1687 | + | |
1709 | 1688 | | |
1710 | 1689 | | |
1711 | 1690 | | |
1712 | 1691 | | |
1713 | 1692 | | |
1714 | 1693 | | |
1715 | | - | |
1716 | | - | |
1717 | | - | |
1718 | | - | |
1719 | | - | |
1720 | | - | |
1721 | | - | |
| 1694 | + | |
1722 | 1695 | | |
1723 | 1696 | | |
1724 | 1697 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | 20 | | |
26 | 21 | | |
27 | 22 | | |
| 23 | + | |
28 | 24 | | |
29 | 25 | | |
30 | 26 | | |
| |||
44 | 40 | | |
45 | 41 | | |
46 | 42 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | 43 | | |
53 | 44 | | |
54 | 45 | | |
| 46 | + | |
55 | 47 | | |
56 | 48 | | |
57 | 49 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 6 | | |
12 | 7 | | |
13 | | - | |
| 8 | + | |
| 9 | + | |
14 | 10 | | |
15 | 11 | | |
16 | 12 | | |
| |||
231 | 227 | | |
232 | 228 | | |
233 | 229 | | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | 230 | | |
240 | 231 | | |
241 | | - | |
| 232 | + | |
| 233 | + | |
242 | 234 | | |
243 | 235 | | |
244 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 38 | + | |
| 39 | + | |
46 | 40 | | |
47 | 41 | | |
48 | 42 | | |
| |||
103 | 97 | | |
104 | 98 | | |
105 | 99 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 100 | + | |
| 101 | + | |
114 | 102 | | |
115 | 103 | | |
116 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 10 | + | |
| 11 | + | |
16 | 12 | | |
17 | 13 | | |
18 | 14 | | |
| |||
28 | 24 | | |
29 | 25 | | |
30 | 26 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 27 | + | |
39 | 28 | | |
40 | 29 | | |
41 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| 171 | + | |
178 | 172 | | |
179 | 173 | | |
180 | 174 | | |
| |||
215 | 209 | | |
216 | 210 | | |
217 | 211 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
| 212 | + | |
224 | 213 | | |
225 | 214 | | |
226 | 215 | | |
| |||
0 commit comments