Skip to content

Commit 07a3bac

Browse files
committed
Tidy up cfgs.
1 parent 3c48342 commit 07a3bac

File tree

12 files changed

+18
-21
lines changed

12 files changed

+18
-21
lines changed

src/backend/libc/io/errno.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ impl Errno {
158158
/// `ECANCELED`
159159
pub const CANCELED: Self = Self(c::ECANCELED);
160160
/// `ECAPMODE`
161-
#[cfg(any(target_os = "freebsd"))]
161+
#[cfg(target_os = "freebsd")]
162162
pub const CAPMODE: Self = Self(c::ECAPMODE);
163163
/// `ECHILD`
164164
#[cfg(not(windows))]

src/backend/libc/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ pub(crate) mod fs;
6161
pub(crate) mod io;
6262
#[cfg(any(target_os = "android", target_os = "linux"))]
6363
#[cfg(feature = "io_uring")]
64-
#[cfg_attr(doc_cfg, doc(cfg(feature = "io_uring")))]
6564
pub(crate) mod io_uring;
6665
#[cfg(not(any(windows, target_os = "wasi")))]
6766
#[cfg(feature = "mm")]

src/backend/libc/offset.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ pub(super) use readwrite_pv::{preadv as libc_preadv, pwritev as libc_pwritev};
360360
)))]
361361
#[cfg(feature = "fs")]
362362
pub(super) use c::posix_fallocate as libc_posix_fallocate;
363-
#[cfg(any(target_os = "l4re"))]
363+
#[cfg(target_os = "l4re")]
364364
#[cfg(feature = "fs")]
365365
pub(super) use c::posix_fallocate64 as libc_posix_fallocate;
366366
#[cfg(not(any(

src/backend/linux_raw/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ mod vdso_wrappers;
2828
pub(crate) mod fs;
2929
pub(crate) mod io;
3030
#[cfg(feature = "io_uring")]
31-
#[cfg_attr(doc_cfg, doc(cfg(feature = "io_uring")))]
3231
pub(crate) mod io_uring;
3332
#[cfg(feature = "mm")]
3433
pub(crate) mod mm;

src/backend/linux_raw/termios/types.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,19 +338,19 @@ pub const B1500000: Speed = linux_raw_sys::general::B1500000;
338338
pub const B2000000: Speed = linux_raw_sys::general::B2000000;
339339

340340
/// `B2500000`
341-
#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64",)))]
341+
#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64")))]
342342
pub const B2500000: Speed = linux_raw_sys::general::B2500000;
343343

344344
/// `B3000000`
345-
#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64",)))]
345+
#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64")))]
346346
pub const B3000000: Speed = linux_raw_sys::general::B3000000;
347347

348348
/// `B3500000`
349-
#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64",)))]
349+
#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64")))]
350350
pub const B3500000: Speed = linux_raw_sys::general::B3500000;
351351

352352
/// `B4000000`
353-
#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64",)))]
353+
#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64")))]
354354
pub const B4000000: Speed = linux_raw_sys::general::B4000000;
355355

356356
/// `CSIZE`

src/backend/linux_raw/vdso_wrappers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ fn init() {
364364

365365
// On all 64-bit platforms, the 64-bit `clock_gettime` symbols are
366366
// always available.
367-
#[cfg(any(target_pointer_width = "64"))]
367+
#[cfg(target_pointer_width = "64")]
368368
let ok = true;
369369

370370
// On some 32-bit platforms, the 64-bit `clock_gettime` symbols are not

src/fs/at.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ pub fn mknodat<P: path::Arg, Fd: AsFd>(
372372
///
373373
/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/fchownat.html
374374
/// [Linux]: https://man7.org/linux/man-pages/man2/fchownat.2.html
375-
#[cfg(not(any(target_os = "wasi")))]
375+
#[cfg(not(target_os = "wasi"))]
376376
#[inline]
377377
pub fn chownat<P: path::Arg, Fd: AsFd>(
378378
dirfd: Fd,

src/termios/tty.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use crate::backend;
55
all(linux_raw, feature = "procfs"),
66
all(libc, not(any(target_os = "fuchsia", target_os = "wasi"))),
77
))]
8-
#[cfg_attr(doc_cfg, doc(cfg(feature = "procfs")))]
98
use crate::io;
109
use backend::fd::AsFd;
1110
#[cfg(any(

src/time/clock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::{backend, io};
33
pub use backend::time::types::{Nsecs, Secs, Timespec};
44

55
/// `clockid_t`
6-
#[cfg(any(not(target_os = "wasi")))]
6+
#[cfg(not(target_os = "wasi"))]
77
pub use backend::time::types::{ClockId, DynamicClockId};
88

99
/// `clock_getres(id)`—Returns the resolution of a clock.

tests/process/prctl.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,37 @@ fn test_machine_check_memory_corruption_kill_policy() {
2626
dbg!(machine_check_memory_corruption_kill_policy().unwrap());
2727
}
2828

29-
#[cfg(any(target_arch = "x86"))]
29+
#[cfg(target_arch = "x86")]
3030
#[test]
3131
fn test_time_stamp_counter_readability() {
3232
dbg!(time_stamp_counter_readability().unwrap());
3333
}
3434

35-
#[cfg(any(target_arch = "powerpc"))]
35+
#[cfg(target_arch = "powerpc")]
3636
#[test]
3737
fn test_unaligned_access_control() {
3838
dbg!(unaligned_access_control().unwrap());
3939
}
4040

41-
#[cfg(any(target_arch = "powerpc"))]
41+
#[cfg(target_arch = "powerpc")]
4242
#[test]
4343
fn test_floating_point_exception_mode() {
4444
dbg!(floating_point_exception_mode().unwrap());
4545
}
4646

47-
#[cfg(any(target_arch = "powerpc"))]
47+
#[cfg(target_arch = "powerpc")]
4848
#[test]
4949
fn test_endian_mode() {
5050
dbg!(endian_mode().unwrap());
5151
}
5252

53-
#[cfg(any(target_arch = "mips"))]
53+
#[cfg(target_arch = "mips")]
5454
#[test]
5555
fn test_floating_point_mode() {
5656
dbg!(floating_point_mode().unwrap());
5757
}
5858

59-
#[cfg(any(target_arch = "aarch64"))]
59+
#[cfg(target_arch = "aarch64")]
6060
#[test]
6161
#[ignore = "Only on ARMv8.3 and later"]
6262
fn test_enabled_pointer_authentication_keys() {

0 commit comments

Comments
 (0)