Skip to content

Commit 38f1ee1

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

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

tokio/src/process/mod.rs

+18-1
Original file line numberDiff line numberDiff line change
@@ -1488,23 +1488,40 @@ 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

14931493
macro_rules! impl_traits {
14941494
($type:ty) => {
1495+
#[cfg(not(docsrs))]
14951496
impl $type {
14961497
/// Convert into [`OwnedHandle`].
14971498
pub fn into_owned_handle(self) -> io::Result<OwnedHandle> {
14981499
self.inner.into_owned_handle()
14991500
}
15001501
}
15011502

1503+
#[cfg(docsrs)]
1504+
impl $type {
1505+
/// Convert into [`OwnedHandle`].
1506+
pub fn into_owned_handle(self) -> io::Result<OwnedHandle> {
1507+
todo!("For doc generation only")
1508+
}
1509+
}
1510+
1511+
#[cfg(not(docsrs))]
15021512
impl AsRawHandle for $type {
15031513
fn as_raw_handle(&self) -> RawHandle {
15041514
self.inner.as_raw_handle()
15051515
}
15061516
}
15071517

1518+
#[cfg(docsrs)]
1519+
impl AsRawHandle for $type {
1520+
fn as_raw_handle(&self) -> RawHandle {
1521+
todo!("For doc generation only")
1522+
}
1523+
}
1524+
15081525
impl AsHandle for $type {
15091526
fn as_handle(&self) -> BorrowedHandle<'_> {
15101527
unsafe { BorrowedHandle::borrow_raw(self.as_raw_handle()) }

0 commit comments

Comments
 (0)