Skip to content
/ rust Public
forked from rust-lang/rust

Commit 45886cc

Browse files
committed
Fix compilation error on unsupported target
Signed-off-by: Jiahao XU <[email protected]>
1 parent 72f5999 commit 45886cc

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//! # }
99
//! ```
1010
11-
use crate::{io, process::Stdio, sys::pipe::AnonPipe};
11+
use crate::{io, sys::pipe::AnonPipe};
1212

1313
/// Create annoymous pipe that is close-on-exec and blocking.
1414
#[unstable(feature = "anonymous_pipe", issue = "127154")]

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

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use super::*;
22

33
use crate::{
44
os::fd::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, OwnedFd, RawFd},
5+
process::Stdio,
56
sys::{
67
fd::FileDesc,
78
pipe::{anon_pipe, AnonPipe},

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

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use crate::{
44
os::windows::io::{
55
AsHandle, AsRawHandle, BorrowedHandle, FromRawHandle, IntoRawHandle, OwnedHandle, RawHandle,
66
},
7+
process::Stdio,
78
sys::{
89
handle::Handle,
910
pipe::{anon_pipe, AnonPipe, Pipes},

library/std/src/sys/pal/unsupported/pipe.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
use crate::io::{self, BorrowedCursor, IoSlice, IoSliceMut};
1+
use crate::{
2+
fmt,
3+
io::{self, BorrowedCursor, IoSlice, IoSliceMut},
4+
};
25

3-
#[derive(Debug)]
46
pub struct AnonPipe(!);
57

8+
impl fmt::Debug for AnonPipe {
9+
fn fmt(&self, _: &mut fmt::Formatter<'_>) -> fmt::Result {
10+
self.0
11+
}
12+
}
13+
614
impl AnonPipe {
715
pub fn try_clone(&self) -> io::Result<Self> {
816
self.0

0 commit comments

Comments
 (0)