about summary refs log tree commit diff
path: root/library/std/src/sys/anonymous_pipe/unix.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-03-17 10:43:38 +0000
committerbors <bors@rust-lang.org>2025-03-17 10:43:38 +0000
commit9c67cecd12d79f1bbc00a74f70e7ef9fff086a5a (patch)
treed43ca065385a4b4d3d8f1b70ba5737dbefa2a46d /library/std/src/sys/anonymous_pipe/unix.rs
parent9bad8ac498985707f29b0bdc0293cc0457a3ab38 (diff)
parent87b87b1966fef82e15a9f9619ee46f5e843cf4c2 (diff)
downloadrust-9c67cecd12d79f1bbc00a74f70e7ef9fff086a5a.tar.gz
rust-9c67cecd12d79f1bbc00a74f70e7ef9fff086a5a.zip
Auto merge of #138595 - jhpratt:rollup-09pvfzu, r=jhpratt
Rollup of 9 pull requests

Successful merges:

 - #136355 (Add `*_value` methods to proc_macro lib)
 - #137621 (Add std support to cygwin target)
 - #137793 (Stablize anonymous pipe)
 - #138341 (std: Mention clone-on-write mutation in Arc<T>)
 - #138517 (Improve upvar analysis for deref of child capture)
 - #138584 (Update Rust Foundation links in Readme)
 - #138586 (Document `#![register_tool]`)
 - #138590 (Flatten and simplify some control flow 🫓)
 - #138592 (update change entry for #137147)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/sys/anonymous_pipe/unix.rs')
-rw-r--r--library/std/src/sys/anonymous_pipe/unix.rs94
1 files changed, 2 insertions, 92 deletions
diff --git a/library/std/src/sys/anonymous_pipe/unix.rs b/library/std/src/sys/anonymous_pipe/unix.rs
index 9e398765634..dfe10f7fafe 100644
--- a/library/std/src/sys/anonymous_pipe/unix.rs
+++ b/library/std/src/sys/anonymous_pipe/unix.rs
@@ -1,9 +1,7 @@
-use crate::io::{self, PipeReader, PipeWriter};
-use crate::os::fd::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, OwnedFd, RawFd};
-use crate::process::Stdio;
+use crate::io;
 use crate::sys::fd::FileDesc;
 use crate::sys::pipe::anon_pipe;
-use crate::sys_common::{FromInner, IntoInner};
+use crate::sys_common::IntoInner;
 
 pub type AnonPipe = FileDesc;
 
@@ -11,91 +9,3 @@ pub type AnonPipe = FileDesc;
 pub fn pipe() -> io::Result<(AnonPipe, AnonPipe)> {
     anon_pipe().map(|(rx, wx)| (rx.into_inner(), wx.into_inner()))
 }
-
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl AsFd for PipeReader {
-    fn as_fd(&self) -> BorrowedFd<'_> {
-        self.0.as_fd()
-    }
-}
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl AsRawFd for PipeReader {
-    fn as_raw_fd(&self) -> RawFd {
-        self.0.as_raw_fd()
-    }
-}
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl From<PipeReader> for OwnedFd {
-    fn from(pipe: PipeReader) -> Self {
-        FileDesc::into_inner(pipe.0)
-    }
-}
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl FromRawFd for PipeReader {
-    unsafe fn from_raw_fd(raw_fd: RawFd) -> Self {
-        unsafe { Self(FileDesc::from_raw_fd(raw_fd)) }
-    }
-}
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl IntoRawFd for PipeReader {
-    fn into_raw_fd(self) -> RawFd {
-        self.0.into_raw_fd()
-    }
-}
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl From<PipeReader> for Stdio {
-    fn from(pipe: PipeReader) -> Self {
-        Self::from(OwnedFd::from(pipe))
-    }
-}
-
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl AsFd for PipeWriter {
-    fn as_fd(&self) -> BorrowedFd<'_> {
-        self.0.as_fd()
-    }
-}
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl AsRawFd for PipeWriter {
-    fn as_raw_fd(&self) -> RawFd {
-        self.0.as_raw_fd()
-    }
-}
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl From<PipeWriter> for OwnedFd {
-    fn from(pipe: PipeWriter) -> Self {
-        FileDesc::into_inner(pipe.0)
-    }
-}
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl FromRawFd for PipeWriter {
-    unsafe fn from_raw_fd(raw_fd: RawFd) -> Self {
-        unsafe { Self(FileDesc::from_raw_fd(raw_fd)) }
-    }
-}
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl IntoRawFd for PipeWriter {
-    fn into_raw_fd(self) -> RawFd {
-        self.0.into_raw_fd()
-    }
-}
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl From<PipeWriter> for Stdio {
-    fn from(pipe: PipeWriter) -> Self {
-        Self::from(OwnedFd::from(pipe))
-    }
-}
-
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl From<OwnedFd> for PipeReader {
-    fn from(owned_fd: OwnedFd) -> Self {
-        Self(FileDesc::from_inner(owned_fd))
-    }
-}
-
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl From<OwnedFd> for PipeWriter {
-    fn from(owned_fd: OwnedFd) -> Self {
-        Self(FileDesc::from_inner(owned_fd))
-    }
-}