summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rustix/src/lib.rs')
-rw-r--r--vendor/rustix/src/lib.rs30
1 files changed, 13 insertions, 17 deletions
diff --git a/vendor/rustix/src/lib.rs b/vendor/rustix/src/lib.rs
index ca7c6cd4e..f8bf0729f 100644
--- a/vendor/rustix/src/lib.rs
+++ b/vendor/rustix/src/lib.rs
@@ -117,6 +117,12 @@
)]
#![cfg_attr(asm_experimental_arch, feature(asm_experimental_arch))]
#![cfg_attr(not(feature = "all-apis"), allow(dead_code))]
+// Clamp depends on Rust 1.50 which is newer than our MSRV.
+#![allow(clippy::manual_clamp)]
+// It is common in linux and libc APIs for types to vary between platforms.
+#![allow(clippy::unnecessary_cast)]
+// It is common in linux and libc APIs for types to vary between platforms.
+#![allow(clippy::useless_conversion)]
#[cfg(not(feature = "rustc-dep-of-std"))]
extern crate alloc;
@@ -130,27 +136,20 @@ pub(crate) mod const_assert;
pub(crate) mod utils;
// Pick the backend implementation to use.
-#[cfg_attr(libc, path = "imp/libc/mod.rs")]
-#[cfg_attr(linux_raw, path = "imp/linux_raw/mod.rs")]
-#[cfg_attr(wasi, path = "imp/wasi/mod.rs")]
-mod imp;
+#[cfg_attr(libc, path = "backend/libc/mod.rs")]
+#[cfg_attr(linux_raw, path = "backend/linux_raw/mod.rs")]
+#[cfg_attr(wasi, path = "backend/wasi/mod.rs")]
+mod backend;
/// Export the `*Fd` types and traits that are used in rustix's public API.
///
/// Users can use this to avoid needing to import anything else to use the same
/// versions of these types and traits.
-///
-/// Rustix APIs that use `OwnedFd` use [`rustix::io::OwnedFd`] instead, which
-/// allows rustix to implement `close` for them.
-///
-/// [`rustix::io::OwnedFd`]: crate::io::OwnedFd
pub mod fd {
- use super::imp;
- pub use imp::fd::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, OwnedFd, RawFd};
+ use super::backend;
#[cfg(windows)]
- pub use imp::fd::{AsSocket, FromSocket, IntoSocket};
- #[cfg(feature = "std")]
- pub use imp::fd::{FromFd, IntoFd};
+ pub use backend::fd::AsSocket;
+ pub use backend::fd::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, OwnedFd, RawFd};
}
// The public API modules.
@@ -214,9 +213,6 @@ pub mod runtime;
// that they're not public, but still available for internal use.
#[cfg(not(windows))]
-#[cfg(not(feature = "fs"))]
-pub(crate) mod fs;
-#[cfg(not(windows))]
#[cfg(all(
not(feature = "param"),
any(feature = "runtime", feature = "time", target_arch = "x86"),