Skip to content

Commit ca14846

Browse files
committed
Fix doc compilation
Signed-off-by: Jiahao XU <[email protected]>
1 parent d59bf6f commit ca14846

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

tokio/src/process/mod.rs

+26-1
Original file line numberDiff line numberDiff line change
@@ -1488,8 +1488,9 @@ mod sys {
14881488
#[cfg_attr(docsrs, doc(cfg(windows)))]
14891489
mod windows {
14901490
use super::*;
1491-
use crate::os::windows::io::{AsHandle, BorrowedHandle, OwnedHandle};
1491+
use crate::os::windows::io::{AsHandle, AsRawHandle, BorrowedHandle, OwnedHandle, RawHandle};
14921492

1493+
#[cfg(not(docsrs))]
14931494
macro_rules! impl_traits {
14941495
($type:ty) => {
14951496
impl $type {
@@ -1513,6 +1514,30 @@ mod windows {
15131514
};
15141515
}
15151516

1517+
#[cfg(docsrs)]
1518+
macro_rules! impl_traits {
1519+
($type:ty) => {
1520+
impl $type {
1521+
/// Convert into [`OwnedHandle`].
1522+
pub fn into_owned_handle(self) -> io::Result<OwnedHandle> {
1523+
todo!("For doc generation only")
1524+
}
1525+
}
1526+
1527+
impl AsRawHandle for $type {
1528+
fn as_raw_handle(&self) -> RawHandle {
1529+
todo!("For doc generation only")
1530+
}
1531+
}
1532+
1533+
impl AsHandle for $type {
1534+
fn as_handle(&self) -> BorrowedHandle<'_> {
1535+
todo!("For doc generation only")
1536+
}
1537+
}
1538+
};
1539+
}
1540+
15161541
impl_traits!(ChildStdin);
15171542
impl_traits!(ChildStdout);
15181543
impl_traits!(ChildStderr);

0 commit comments

Comments
 (0)