Skip to content

Commit 100fe5c

Browse files
committed
Move std::net::pip* to a new mod std::pipe
Signed-off-by: Jiahao XU <[email protected]>
1 parent e22dd1a commit 100fe5c

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

library/std/src/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,9 @@ pub use core::{
685685
module_path, option_env, stringify, trace_macros,
686686
};
687687

688+
#[unstable(feature = "anonymous_pipe", issue = "127154")]
689+
pub use crate::sys::anonymous_pipe as pipe;
690+
688691
#[unstable(
689692
feature = "concat_bytes",
690693
issue = "87555",

library/std/src/net/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ pub use self::tcp::IntoIncoming;
3333
pub use self::tcp::{Incoming, TcpListener, TcpStream};
3434
#[stable(feature = "rust1", since = "1.0.0")]
3535
pub use self::udp::UdpSocket;
36-
#[unstable(feature = "anonymous_pipe", issue = "127154")]
37-
pub use crate::sys::anonymous_pipe::{pipe, PipeReader, PipeWriter};
3836
#[stable(feature = "rust1", since = "1.0.0")]
3937
pub use core::net::AddrParseError;
4038

library/std/src/sys/anonymous_pipe/mod.rs

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
//! Module for annoymous pipe
2+
//!
3+
//! ```
4+
//! #![feature(anonymous_pipe)]
5+
//! # fn main() -> std::io::Result<()> {
6+
//! let (reader, writer) = std::pipe::pipe()?;
7+
//! # Ok(())
8+
//! # }
9+
//! ```
10+
111
use crate::{io, process::Stdio, sys::pipe::AnonPipe};
212

313
/// Create annoymous pipe that is close-on-exec and blocking.

library/std/src/sys/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ mod pal;
55

66
mod personality;
77

8+
#[unstable(feature = "anonymous_pipe", issue = "127154")]
89
pub mod anonymous_pipe;
910
pub mod backtrace;
1011
pub mod cmath;

0 commit comments

Comments
 (0)