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>2024-08-01 00:03:28 +0000
committerbors <bors@rust-lang.org>2024-08-01 00:03:28 +0000
commit71b211609605590423a68ba3f503e53404d4fdb4 (patch)
tree4a7c2647064201e17116cd74dc56b33d0a0f68bf /library/std/src/sys/anonymous_pipe/unix.rs
parent28a58f2fa7f0c46b8fab8237c02471a915924fe5 (diff)
parentcf900ab62d4190be8fbe6448a2d604b951330b2d (diff)
downloadrust-71b211609605590423a68ba3f503e53404d4fdb4.tar.gz
rust-71b211609605590423a68ba3f503e53404d4fdb4.zip
Auto merge of #128469 - matthiaskrgr:rollup-00svite, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #127567 (std: implement the `once_wait` feature)
 - #128162 (Cleanup sys module to match house style)
 - #128296 (Update target-spec metadata for loongarch64 targets)
 - #128443 (Properly mark loop as diverging if it has no breaks)
 - #128449 (Temporarily switch `ambiguous_negative_literals` lint to allow)
 - #128452 (derive(SmartPointer): require pointee to be maybe sized)

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.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/sys/anonymous_pipe/unix.rs b/library/std/src/sys/anonymous_pipe/unix.rs
index 7c0e75208c4..9168024730e 100644
--- a/library/std/src/sys/anonymous_pipe/unix.rs
+++ b/library/std/src/sys/anonymous_pipe/unix.rs
@@ -6,10 +6,10 @@ use crate::sys::fd::FileDesc;
 use crate::sys::pipe::anon_pipe;
 use crate::sys_common::{FromInner, IntoInner};
 
-pub(crate) type AnonPipe = FileDesc;
+pub type AnonPipe = FileDesc;
 
 #[inline]
-pub(crate) fn pipe() -> io::Result<(AnonPipe, AnonPipe)> {
+pub fn pipe() -> io::Result<(AnonPipe, AnonPipe)> {
     anon_pipe().map(|(rx, wx)| (rx.into_inner(), wx.into_inner()))
 }
 
@@ -34,7 +34,7 @@ impl From<PipeReader> for OwnedFd {
 #[unstable(feature = "anonymous_pipe", issue = "127154")]
 impl FromRawFd for PipeReader {
     unsafe fn from_raw_fd(raw_fd: RawFd) -> Self {
-        Self(FileDesc::from_raw_fd(raw_fd))
+        unsafe { Self(FileDesc::from_raw_fd(raw_fd)) }
     }
 }
 #[unstable(feature = "anonymous_pipe", issue = "127154")]
@@ -71,7 +71,7 @@ impl From<PipeWriter> for OwnedFd {
 #[unstable(feature = "anonymous_pipe", issue = "127154")]
 impl FromRawFd for PipeWriter {
     unsafe fn from_raw_fd(raw_fd: RawFd) -> Self {
-        Self(FileDesc::from_raw_fd(raw_fd))
+        unsafe { Self(FileDesc::from_raw_fd(raw_fd)) }
     }
 }
 #[unstable(feature = "anonymous_pipe", issue = "127154")]