Skip to content

Commit 1cd4f00

Browse files
authored
Alphabetize targets in any and all in cfg directives. (#1419)
This isn't necessary, but it does make maintenance a little easier as it's easier to see when two `cfg`s are the same.
1 parent f2e1474 commit 1cd4f00

29 files changed

+129
-130
lines changed

src/backend/libc/fs/syscalls.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ use {
7878
#[cfg(not(any(
7979
apple,
8080
netbsdlike,
81-
target_os = "solaris",
8281
target_os = "dragonfly",
8382
target_os = "espidf",
8483
target_os = "haiku",
8584
target_os = "horizon",
8685
target_os = "redox",
86+
target_os = "solaris",
8787
target_os = "vita",
8888
)))]
8989
use {crate::fs::Advice, core::num::NonZeroU64};
@@ -1258,12 +1258,12 @@ pub(crate) fn copy_file_range(
12581258
#[cfg(not(any(
12591259
apple,
12601260
netbsdlike,
1261-
target_os = "solaris",
12621261
target_os = "dragonfly",
12631262
target_os = "espidf",
12641263
target_os = "haiku",
12651264
target_os = "horizon",
12661265
target_os = "redox",
1266+
target_os = "solaris",
12671267
target_os = "vita",
12681268
)))]
12691269
pub(crate) fn fadvise(

src/backend/libc/fs/types.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,12 @@ bitflags! {
376376
/// functions, use [`rustix::fs::fcntl_setfl`] instead.
377377
#[cfg(not(any(
378378
target_os = "aix",
379+
target_os = "cygwin",
379380
target_os = "espidf",
380381
target_os = "haiku",
381382
target_os = "horizon",
382383
target_os = "wasi",
383384
target_os = "vita",
384-
target_os = "cygwin",
385385
solarish
386386
)))]
387387
const ASYNC = bitcast!(c::O_ASYNC);
@@ -631,12 +631,12 @@ impl FileType {
631631
#[cfg(not(any(
632632
apple,
633633
netbsdlike,
634-
target_os = "solaris",
635634
target_os = "dragonfly",
636635
target_os = "espidf",
637636
target_os = "horizon",
638637
target_os = "haiku",
639638
target_os = "redox",
639+
target_os = "solaris",
640640
target_os = "vita",
641641
)))]
642642
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
@@ -782,14 +782,14 @@ bitflags! {
782782
bsd,
783783
solarish,
784784
target_os = "aix",
785+
target_os = "cygwin",
785786
target_os = "emscripten",
786787
target_os = "fuchsia",
787788
target_os = "haiku",
788789
target_os = "hurd",
789790
target_os = "l4re",
790791
target_os = "linux",
791792
target_os = "wasi",
792-
target_os = "cygwin",
793793
)))]
794794
const NO_HIDE_STALE = bitcast!(c::FALLOC_FL_NO_HIDE_STALE);
795795
/// `FALLOC_FL_COLLAPSE_RANGE`
@@ -1059,14 +1059,14 @@ pub type StatFs = c::statfs64;
10591059
/// `fsid_t` for use with [`StatFs`].
10601060
#[cfg(not(any(
10611061
solarish,
1062+
target_os = "cygwin",
10621063
target_os = "espidf",
10631064
target_os = "haiku",
10641065
target_os = "horizon",
10651066
target_os = "nto",
10661067
target_os = "redox",
10671068
target_os = "vita",
10681069
target_os = "wasi",
1069-
target_os = "cygwin"
10701070
)))]
10711071
pub type Fsid = c::fsid_t;
10721072

src/backend/libc/io/errno.rs

+13-13
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ impl Errno {
276276
windows,
277277
target_os = "aix",
278278
target_os = "android",
279+
target_os = "cygwin",
279280
target_os = "espidf",
280281
target_os = "haiku",
281282
target_os = "horizon",
@@ -285,7 +286,6 @@ impl Errno {
285286
target_os = "redox",
286287
target_os = "vita",
287288
target_os = "wasi",
288-
target_os = "cygwin",
289289
)))]
290290
pub const HWPOISON: Self = Self(c::EHWPOISON);
291291
/// `EIDRM`
@@ -327,6 +327,7 @@ impl Errno {
327327
solarish,
328328
windows,
329329
target_os = "aix",
330+
target_os = "cygwin",
330331
target_os = "espidf",
331332
target_os = "haiku",
332333
target_os = "horizon",
@@ -335,7 +336,6 @@ impl Errno {
335336
target_os = "nto",
336337
target_os = "vita",
337338
target_os = "wasi",
338-
target_os = "cygwin",
339339
)))]
340340
pub const ISNAM: Self = Self(c::EISNAM);
341341
/// `EKEYEXPIRED`
@@ -344,6 +344,7 @@ impl Errno {
344344
solarish,
345345
windows,
346346
target_os = "aix",
347+
target_os = "cygwin",
347348
target_os = "espidf",
348349
target_os = "haiku",
349350
target_os = "horizon",
@@ -352,7 +353,6 @@ impl Errno {
352353
target_os = "nto",
353354
target_os = "vita",
354355
target_os = "wasi",
355-
target_os = "cygwin",
356356
)))]
357357
pub const KEYEXPIRED: Self = Self(c::EKEYEXPIRED);
358358
/// `EKEYREJECTED`
@@ -361,6 +361,7 @@ impl Errno {
361361
solarish,
362362
windows,
363363
target_os = "aix",
364+
target_os = "cygwin",
364365
target_os = "espidf",
365366
target_os = "haiku",
366367
target_os = "horizon",
@@ -369,7 +370,6 @@ impl Errno {
369370
target_os = "nto",
370371
target_os = "vita",
371372
target_os = "wasi",
372-
target_os = "cygwin",
373373
)))]
374374
pub const KEYREJECTED: Self = Self(c::EKEYREJECTED);
375375
/// `EKEYREVOKED`
@@ -378,6 +378,7 @@ impl Errno {
378378
solarish,
379379
windows,
380380
target_os = "aix",
381+
target_os = "cygwin",
381382
target_os = "espidf",
382383
target_os = "haiku",
383384
target_os = "horizon",
@@ -386,7 +387,6 @@ impl Errno {
386387
target_os = "nto",
387388
target_os = "vita",
388389
target_os = "wasi",
389-
target_os = "cygwin",
390390
)))]
391391
pub const KEYREVOKED: Self = Self(c::EKEYREVOKED);
392392
/// `EL2HLT`
@@ -531,6 +531,7 @@ impl Errno {
531531
solarish,
532532
windows,
533533
target_os = "aix",
534+
target_os = "cygwin",
534535
target_os = "espidf",
535536
target_os = "haiku",
536537
target_os = "horizon",
@@ -539,7 +540,6 @@ impl Errno {
539540
target_os = "nto",
540541
target_os = "vita",
541542
target_os = "wasi",
542-
target_os = "cygwin",
543543
)))]
544544
pub const MEDIUMTYPE: Self = Self(c::EMEDIUMTYPE);
545545
/// `EMFILE`
@@ -561,6 +561,7 @@ impl Errno {
561561
solarish,
562562
windows,
563563
target_os = "aix",
564+
target_os = "cygwin",
564565
target_os = "espidf",
565566
target_os = "haiku",
566567
target_os = "horizon",
@@ -569,7 +570,6 @@ impl Errno {
569570
target_os = "nto",
570571
target_os = "vita",
571572
target_os = "wasi",
572-
target_os = "cygwin",
573573
)))]
574574
pub const NAVAIL: Self = Self(c::ENAVAIL);
575575
/// `ENEEDAUTH`
@@ -642,6 +642,7 @@ impl Errno {
642642
bsd,
643643
windows,
644644
target_os = "aix",
645+
target_os = "cygwin",
645646
target_os = "espidf",
646647
target_os = "haiku",
647648
target_os = "horizon",
@@ -650,7 +651,6 @@ impl Errno {
650651
target_os = "nto",
651652
target_os = "vita",
652653
target_os = "wasi",
653-
target_os = "cygwin",
654654
)))]
655655
pub const NOKEY: Self = Self(c::ENOKEY);
656656
/// `ENOLCK`
@@ -767,6 +767,7 @@ impl Errno {
767767
solarish,
768768
windows,
769769
target_os = "aix",
770+
target_os = "cygwin",
770771
target_os = "espidf",
771772
target_os = "haiku",
772773
target_os = "horizon",
@@ -775,7 +776,6 @@ impl Errno {
775776
target_os = "nto",
776777
target_os = "vita",
777778
target_os = "wasi",
778-
target_os = "cygwin",
779779
)))]
780780
pub const NOTNAM: Self = Self(c::ENOTNAM);
781781
/// `ENOTRECOVERABLE`
@@ -896,6 +896,7 @@ impl Errno {
896896
solarish,
897897
windows,
898898
target_os = "aix",
899+
target_os = "cygwin",
899900
target_os = "espidf",
900901
target_os = "haiku",
901902
target_os = "horizon",
@@ -904,21 +905,20 @@ impl Errno {
904905
target_os = "nto",
905906
target_os = "vita",
906907
target_os = "wasi",
907-
target_os = "cygwin",
908908
)))]
909909
pub const REMOTEIO: Self = Self(c::EREMOTEIO);
910910
/// `ERESTART`
911911
#[cfg(not(any(
912912
bsd,
913913
windows,
914+
target_os = "cygwin",
914915
target_os = "espidf",
915916
target_os = "haiku",
916917
target_os = "horizon",
917918
target_os = "hurd",
918919
target_os = "l4re",
919920
target_os = "vita",
920921
target_os = "wasi",
921-
target_os = "cygwin",
922922
)))]
923923
pub const RESTART: Self = Self(c::ERESTART);
924924
/// `ERFKILL`
@@ -928,6 +928,7 @@ impl Errno {
928928
windows,
929929
target_os = "aix",
930930
target_os = "android",
931+
target_os = "cygwin",
931932
target_os = "espidf",
932933
target_os = "haiku",
933934
target_os = "horizon",
@@ -937,7 +938,6 @@ impl Errno {
937938
target_os = "redox",
938939
target_os = "vita",
939940
target_os = "wasi",
940-
target_os = "cygwin",
941941
)))]
942942
pub const RFKILL: Self = Self(c::ERFKILL);
943943
/// `EROFS`
@@ -1028,6 +1028,7 @@ impl Errno {
10281028
solarish,
10291029
windows,
10301030
target_os = "aix",
1031+
target_os = "cygwin",
10311032
target_os = "espidf",
10321033
target_os = "haiku",
10331034
target_os = "horizon",
@@ -1036,7 +1037,6 @@ impl Errno {
10361037
target_os = "nto",
10371038
target_os = "vita",
10381039
target_os = "wasi",
1039-
target_os = "cygwin",
10401040
)))]
10411041
pub const UCLEAN: Self = Self(c::EUCLEAN);
10421042
/// `EUNATCH`

src/backend/libc/io/syscalls.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ pub(crate) fn writev(fd: BorrowedFd<'_>, bufs: &[IoSlice<'_>]) -> io::Result<usi
9595
}
9696

9797
#[cfg(not(any(
98+
target_os = "cygwin",
9899
target_os = "espidf",
99100
target_os = "haiku",
100101
target_os = "horizon",
101102
target_os = "nto",
102103
target_os = "redox",
103104
target_os = "solaris",
104105
target_os = "vita",
105-
target_os = "cygwin",
106106
)))]
107107
pub(crate) fn preadv(
108108
fd: BorrowedFd<'_>,
@@ -122,14 +122,14 @@ pub(crate) fn preadv(
122122
}
123123

124124
#[cfg(not(any(
125+
target_os = "cygwin",
125126
target_os = "espidf",
126127
target_os = "haiku",
127128
target_os = "nto",
128129
target_os = "horizon",
129130
target_os = "redox",
130131
target_os = "solaris",
131132
target_os = "vita",
132-
target_os = "cygwin",
133133
)))]
134134
pub(crate) fn pwritev(fd: BorrowedFd<'_>, bufs: &[IoSlice<'_>], offset: u64) -> io::Result<usize> {
135135
// Silently cast; we'll get `EINVAL` if the value is negative.

0 commit comments

Comments
 (0)