Skip to content

Commit

Permalink
Change imports for cfg(doc)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkTed committed Sep 27, 2020
1 parent 20c88dd commit 7eea071
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 30 deletions.
2 changes: 1 addition & 1 deletion library/std/src/sys/unix/ext/net/addr.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::ffi::OsStr;
use crate::os::unix::ffi::OsStrExt;
use crate::path::Path;
use crate::sys::unix::cvt;
use crate::sys::cvt;
use crate::{ascii, fmt, io, mem};

// FIXME(#43348): Make libc adapt #[doc(cfg(...))] so we don't need these fake definitions here?
Expand Down
4 changes: 2 additions & 2 deletions library/std/src/sys/unix/ext/net/ancillary.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use super::{sockaddr_un, SocketAddr};
use crate::convert::TryFrom;
use crate::io::{self, IoSliceMut};
use crate::marker::PhantomData;
Expand All @@ -6,8 +7,7 @@ use crate::os::unix::io::RawFd;
use crate::path::Path;
use crate::ptr::read_unaligned;
use crate::slice::from_raw_parts;
use crate::sys::unix::ext::net::addr::{sockaddr_un, SocketAddr};
use crate::sys::unix::net::Socket;
use crate::sys::net::Socket;

#[cfg(any(target_os = "android", target_os = "linux",))]
use libc::{gid_t, pid_t, uid_t};
Expand Down
20 changes: 10 additions & 10 deletions library/std/src/sys/unix/ext/net/datagram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
target_os = "netbsd",
target_os = "openbsd",
))]
use crate::io::IoSliceMut;
use crate::net::Shutdown;
use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
use crate::path::Path;
use crate::sys::unix::cvt;
use crate::sys::unix::ext::net::addr::{sockaddr_un, SocketAddr};
use super::{
recv_vectored_with_ancillary_from, send_vectored_with_ancillary_to, sockaddr_un, SocketAddr,
SocketAncillary,
};
#[cfg(any(
target_os = "android",
target_os = "dragonfly",
Expand All @@ -22,10 +20,12 @@ use crate::sys::unix::ext::net::addr::{sockaddr_un, SocketAddr};
target_os = "netbsd",
target_os = "openbsd",
))]
use crate::sys::unix::ext::net::ancillary::{
recv_vectored_with_ancillary_from, send_vectored_with_ancillary_to, SocketAncillary,
};
use crate::sys::unix::net::Socket;
use crate::io::IoSliceMut;
use crate::net::Shutdown;
use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
use crate::path::Path;
use crate::sys::cvt;
use crate::sys::net::Socket;
use crate::sys_common::{AsInner, FromInner, IntoInner};
use crate::time::Duration;
use crate::{fmt, io};
Expand Down
5 changes: 2 additions & 3 deletions library/std/src/sys/unix/ext/net/listener.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use super::{sockaddr_un, SocketAddr, UnixStream};
use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
use crate::path::Path;
use crate::sys::cvt;
use crate::sys::net::Socket;
use crate::sys::unix::cvt;
use crate::sys::unix::ext::net::addr::{sockaddr_un, SocketAddr};
use crate::sys::unix::ext::net::stream::UnixStream;
use crate::sys_common::{AsInner, FromInner, IntoInner};
use crate::{fmt, io, mem};

Expand Down
26 changes: 13 additions & 13 deletions library/std/src/sys/unix/ext/net/stream.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
#[cfg(any(
target_os = "android",
target_os = "dragonfly",
target_os = "emscripten",
target_os = "freebsd",
target_os = "linux",
target_os = "netbsd",
target_os = "openbsd",
))]
use super::{
recv_vectored_with_ancillary_from, send_vectored_with_ancillary_to, sockaddr_un, SocketAddr,
SocketAncillary,
};
use crate::fmt;
use crate::io::{self, Initializer, IoSlice, IoSliceMut};
use crate::net::Shutdown;
Expand All @@ -15,19 +28,6 @@ use crate::os::unix::ucred;
use crate::path::Path;
use crate::sys::cvt;
use crate::sys::net::Socket;
use crate::sys::unix::ext::net::addr::{sockaddr_un, SocketAddr};
#[cfg(any(
target_os = "android",
target_os = "dragonfly",
target_os = "emscripten",
target_os = "freebsd",
target_os = "linux",
target_os = "netbsd",
target_os = "openbsd",
))]
use crate::sys::unix::ext::net::ancillary::{
recv_vectored_with_ancillary_from, send_vectored_with_ancillary_to, SocketAncillary,
};
use crate::sys_common::{AsInner, FromInner, IntoInner};
use crate::time::Duration;

Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/unix/ext/net/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use super::*;
use crate::io::prelude::*;
use crate::io::{self, ErrorKind, IoSlice, IoSliceMut};
use crate::iter::FromIterator;
use crate::sys::unix::ext::io::AsRawFd;
use crate::os::unix::io::AsRawFd;
use crate::sys_common::io::test::tmpdir;
use crate::thread;
use crate::time::Duration;
Expand Down

0 comments on commit 7eea071

Please sign in to comment.