summaryrefslogtreecommitdiffstats
path: root/vendor/io-lifetimes/src/lib.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
commit1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch)
tree3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /vendor/io-lifetimes/src/lib.rs
parentReleasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz
rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/io-lifetimes/src/lib.rs')
-rw-r--r--vendor/io-lifetimes/src/lib.rs17
1 files changed, 10 insertions, 7 deletions
diff --git a/vendor/io-lifetimes/src/lib.rs b/vendor/io-lifetimes/src/lib.rs
index d77954133..e293cc589 100644
--- a/vendor/io-lifetimes/src/lib.rs
+++ b/vendor/io-lifetimes/src/lib.rs
@@ -28,10 +28,10 @@
//! [from+into conversions]: FromFilelike::from_into_filelike
#![deny(missing_docs)]
-// Work around https://github.com/rust-lang/rust/issues/103306.
+// Work around <https://github.com/rust-lang/rust/issues/103306>.
#![cfg_attr(all(wasi_ext, target_os = "wasi"), feature(wasi_ext))]
// Currently supported platforms.
-#![cfg(any(unix, windows, target_os = "wasi"))]
+#![cfg(any(unix, windows, target_os = "wasi", target_os = "hermit"))]
mod portability;
mod traits;
@@ -42,12 +42,12 @@ mod types;
mod impls_std;
#[cfg(not(io_safety_is_in_std))]
-#[cfg(any(unix, target_os = "wasi"))]
+#[cfg(any(unix, target_os = "wasi", target_os = "hermit"))]
pub use traits::AsFd;
#[cfg(not(io_safety_is_in_std))]
#[cfg(windows)]
pub use traits::{AsHandle, AsSocket};
-#[cfg(any(unix, target_os = "wasi"))]
+#[cfg(any(unix, target_os = "wasi", target_os = "hermit"))]
#[allow(deprecated)]
pub use traits::{FromFd, IntoFd};
#[cfg(windows)]
@@ -55,7 +55,7 @@ pub use traits::{FromFd, IntoFd};
pub use traits::{FromHandle, FromSocket, IntoHandle, IntoSocket};
#[cfg(not(io_safety_is_in_std))]
-#[cfg(any(unix, target_os = "wasi"))]
+#[cfg(any(unix, target_os = "wasi", target_os = "hermit"))]
pub use types::{BorrowedFd, OwnedFd};
#[cfg(not(io_safety_is_in_std))]
#[cfg(windows)]
@@ -65,6 +65,9 @@ pub use types::{
};
#[cfg(io_safety_is_in_std)]
+#[cfg(target_os = "hermit")]
+pub use std::os::hermit::io::{AsFd, BorrowedFd, OwnedFd};
+#[cfg(io_safety_is_in_std)]
#[cfg(unix)]
pub use std::os::unix::io::{AsFd, BorrowedFd, OwnedFd};
#[cfg(io_safety_is_in_std)]
@@ -89,7 +92,7 @@ pub use std::os::windows::io::{
// So we define `FromFd`/`IntoFd` traits, and implement them in terms of
// `From`/`Into`,
#[cfg(io_safety_is_in_std)]
-#[cfg(any(unix, target_os = "wasi"))]
+#[cfg(any(unix, target_os = "wasi", target_os = "hermit"))]
#[allow(deprecated)]
impl<T: From<OwnedFd>> FromFd for T {
#[inline]
@@ -98,7 +101,7 @@ impl<T: From<OwnedFd>> FromFd for T {
}
}
#[cfg(io_safety_is_in_std)]
-#[cfg(any(unix, target_os = "wasi"))]
+#[cfg(any(unix, target_os = "wasi", target_os = "hermit"))]
#[allow(deprecated)]
impl<T> IntoFd for T
where