Skip to content

Commit 80f8320

Browse files
committed
Cleanup cfg blocks
Remove obsolete references to target_env = wasi, target_os = nacl, target_os = osx, and a typo'd target_os = fushsia that didn't compile when fixed. - target_env = wasi is dead: rust-lang/rust#60117 - target_os = nacl is dead: rust-lang/rust#45041 - target_os = osx is dead, but I can't find a link.
1 parent 5dedbc7 commit 80f8320

File tree

7 files changed

+9
-15
lines changed

7 files changed

+9
-15
lines changed

src/env.rs

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ pub unsafe fn clearenv() -> std::result::Result<(), ClearEnvError> {
4242
cfg_if! {
4343
if #[cfg(any(target_os = "fuchsia",
4444
target_os = "wasi",
45-
target_env = "wasi",
4645
target_env = "uclibc",
4746
target_os = "linux",
4847
target_os = "android",

src/fcntl.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use crate::{
2020
target_os = "android",
2121
target_os = "emscripten",
2222
target_os = "fuchsia",
23-
any(target_os = "wasi", target_env = "wasi"),
23+
target_os = "wasi",
2424
target_env = "uclibc",
2525
target_os = "freebsd"
2626
))]
@@ -828,7 +828,7 @@ pub fn fspacectl_all(fd: RawFd, offset: libc::off_t, len: libc::off_t)
828828
target_os = "android",
829829
target_os = "emscripten",
830830
target_os = "fuchsia",
831-
any(target_os = "wasi", target_env = "wasi"),
831+
target_os = "wasi",
832832
target_env = "uclibc",
833833
target_os = "freebsd"
834834
))]
@@ -877,7 +877,7 @@ mod posix_fadvise {
877877
target_os = "dragonfly",
878878
target_os = "emscripten",
879879
target_os = "fuchsia",
880-
any(target_os = "wasi", target_env = "wasi"),
880+
target_os = "wasi",
881881
target_os = "freebsd"
882882
))]
883883
pub fn posix_fallocate(fd: RawFd, offset: libc::off_t, len: libc::off_t) -> Result<()> {

src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ feature! {
116116
}
117117
#[cfg(any(target_os = "dragonfly",
118118
target_os = "freebsd",
119-
target_os = "fushsia",
120119
target_os = "linux",
121120
target_os = "netbsd"))]
122121
feature! {

src/net/if_.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ libc_bitflags!(
103103
target_os = "freebsd",
104104
target_os = "macos",
105105
target_os = "netbsd",
106-
target_os = "openbsd",
107-
target_os = "osx"))]
106+
target_os = "openbsd"))]
108107
#[cfg_attr(docsrs, doc(cfg(all())))]
109108
IFF_SIMPLEX;
110109
/// Supports multicast. (see

src/sys/socket/sockopt.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,7 @@ sockopt_impl!(
380380
#[cfg(any(target_os = "android",
381381
target_os = "dragonfly",
382382
target_os = "freebsd",
383-
target_os = "linux",
384-
target_os = "nacl"))]
383+
target_os = "linux"))]
385384
#[cfg(feature = "net")]
386385
sockopt_impl!(
387386
#[cfg_attr(docsrs, doc(cfg(feature = "net")))]
@@ -993,8 +992,7 @@ mod test {
993992
}
994993

995994
#[cfg(any(target_os = "freebsd",
996-
target_os = "linux",
997-
target_os = "nacl"))]
995+
target_os = "linux"))]
998996
#[test]
999997
fn can_get_listen_on_tcp_socket() {
1000998
use super::super::*;

test/sys/test_sockopt.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,7 @@ fn test_so_tcp_keepalive() {
170170
#[cfg(any(target_os = "android",
171171
target_os = "dragonfly",
172172
target_os = "freebsd",
173-
target_os = "linux",
174-
target_os = "nacl"))] {
173+
target_os = "linux"))] {
175174
let x = getsockopt(fd, sockopt::TcpKeepIdle).unwrap();
176175
setsockopt(fd, sockopt::TcpKeepIdle, &(x + 1)).unwrap();
177176
assert_eq!(getsockopt(fd, sockopt::TcpKeepIdle).unwrap(), x + 1);

test/test_fcntl.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ mod linux_android {
462462
target_os = "android",
463463
target_os = "emscripten",
464464
target_os = "fuchsia",
465-
any(target_os = "wasi", target_env = "wasi"),
465+
target_os = "wasi",
466466
target_env = "uclibc",
467467
target_os = "freebsd"))]
468468
mod test_posix_fadvise {
@@ -495,7 +495,7 @@ mod test_posix_fadvise {
495495
target_os = "dragonfly",
496496
target_os = "emscripten",
497497
target_os = "fuchsia",
498-
any(target_os = "wasi", target_env = "wasi"),
498+
target_os = "wasi",
499499
target_os = "freebsd"))]
500500
mod test_posix_fallocate {
501501

0 commit comments

Comments
 (0)