diff --git a/tokio/src/process/mod.rs b/tokio/src/process/mod.rs index dc7b145a9f4..3672f117afd 100644 --- a/tokio/src/process/mod.rs +++ b/tokio/src/process/mod.rs @@ -1488,8 +1488,9 @@ mod sys { #[cfg_attr(docsrs, doc(cfg(windows)))] mod windows { use super::*; - use crate::os::windows::io::{AsHandle, BorrowedHandle, OwnedHandle}; + use crate::os::windows::io::{AsHandle, AsRawHandle, BorrowedHandle, OwnedHandle, RawHandle}; + #[cfg(not(docsrs))] macro_rules! impl_traits { ($type:ty) => { impl $type { @@ -1513,6 +1514,30 @@ mod windows { }; } + #[cfg(docsrs)] + macro_rules! impl_traits { + ($type:ty) => { + impl $type { + /// Convert into [`OwnedHandle`]. + pub fn into_owned_handle(self) -> io::Result { + todo!("For doc generation only") + } + } + + impl AsRawHandle for $type { + fn as_raw_handle(&self) -> RawHandle { + todo!("For doc generation only") + } + } + + impl AsHandle for $type { + fn as_handle(&self) -> BorrowedHandle<'_> { + todo!("For doc generation only") + } + } + }; + } + impl_traits!(ChildStdin); impl_traits!(ChildStdout); impl_traits!(ChildStderr);