1
Fork 0

Change imports for cfg(doc)

This commit is contained in:
LinkTed 2020-09-27 22:29:02 +02:00
parent e9bf69954c
commit 1ae54e560a
6 changed files with 34 additions and 35 deletions

View file

@ -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?

View file

@ -1,3 +1,4 @@
use super::{sockaddr_un, SocketAddr};
use crate::convert::TryFrom;
use crate::io::{self, IoSliceMut};
use crate::marker::PhantomData;
@ -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};

View file

@ -7,25 +7,25 @@
target_os = "netbsd",
target_os = "openbsd",
))]
use super::{
recv_vectored_with_ancillary_from, send_vectored_with_ancillary_to, sockaddr_un, SocketAddr,
SocketAncillary,
};
#[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::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};
#[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::unix::net::Socket;
use crate::sys::cvt;
use crate::sys::net::Socket;
use crate::sys_common::{AsInner, FromInner, IntoInner};
use crate::time::Duration;
use crate::{fmt, io};

View file

@ -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};

View file

@ -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;
@ -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;

View file

@ -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;