about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-06-17 04:53:56 +0100
committerGitHub <noreply@github.com>2024-06-17 04:53:56 +0100
commitcd4c0f06daddd6f3b1f18ede64584f1505f1bc9b (patch)
treec051c7a12f370b0faf4a9b3447b4989c7dbb7694
parenta8ccf974456ad63f9d5167465676a9f99401dc19 (diff)
parentc462328382b9fc1c39ffca3f519f7559717b2ccc (diff)
Rollup merge of #126346 - hermit-os:fd, r=Amanieu
export std::os::fd module on HermitOS

The HermitOS' IO interface is similiar to Unix. Consequently, this PR synchronize the FD implementation between both.

closes #126198
-rw-r--r--library/std/src/os/hermit/io/mod.rs15
-rw-r--r--library/std/src/os/mod.rs2
2 files changed, 4 insertions, 13 deletions
diff --git a/library/std/src/os/hermit/io/mod.rs b/library/std/src/os/hermit/io/mod.rs
index 524dfae0d63..df93f63a003 100644
--- a/library/std/src/os/hermit/io/mod.rs
+++ b/library/std/src/os/hermit/io/mod.rs
@@ -1,13 +1,4 @@
-#![stable(feature = "os_fd", since = "1.66.0")]
+#![stable(feature = "rust1", since = "1.0.0")]
 
-mod net;
-#[path = "../../fd/owned.rs"]
-mod owned;
-#[path = "../../fd/raw.rs"]
-mod raw;
-
-// Export the types and traits for the public API.
-#[stable(feature = "os_fd", since = "1.66.0")]
-pub use owned::*;
-#[stable(feature = "os_fd", since = "1.66.0")]
-pub use raw::*;
+#[stable(feature = "rust1", since = "1.0.0")]
+pub use crate::os::fd::*;
diff --git a/library/std/src/os/mod.rs b/library/std/src/os/mod.rs
index ca3584e82f9..d2a7b316b81 100644
--- a/library/std/src/os/mod.rs
+++ b/library/std/src/os/mod.rs
@@ -160,7 +160,7 @@ pub(crate) mod watchos;
 #[cfg(target_os = "xous")]
 pub mod xous;
 
-#[cfg(any(unix, target_os = "wasi", doc))]
+#[cfg(any(unix, target_os = "hermit", target_os = "wasi", doc))]
 pub mod fd;
 
 #[cfg(any(target_os = "linux", target_os = "android", doc))]