From ef9633c98e69210490d8ab881a2396ba4482550e Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Sun, 26 Feb 2023 13:55:11 +0100 Subject: [PATCH] Allow some broken links It's too much of a hassle to fix these on all platforms, so they can simply be displayed as text, without a link. --- src/socket.rs | 12 +++++++++--- src/sys/unix.rs | 9 +++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/socket.rs b/src/socket.rs index e65552de..1898e8a7 100644 --- a/src/socket.rs +++ b/src/socket.rs @@ -425,6 +425,7 @@ impl Socket { /// /// [`recv`]: Socket::recv /// [`out_of_band_inline`]: Socket::out_of_band_inline + #[cfg_attr(target_os = "redox", allow(rustdoc::broken_intra_doc_links))] pub fn recv_out_of_band(&self, buf: &mut [MaybeUninit]) -> io::Result { self.recv_with_flags(buf, sys::MSG_OOB) } @@ -640,7 +641,7 @@ impl Socket { /// Identical to [`send`] but allows for specification of arbitrary flags to the underlying /// `send` call. /// - /// [`send`]: #method.send + /// [`send`]: Socket::send pub fn send_with_flags(&self, buf: &[u8], flags: c_int) -> io::Result { sys::send(self.as_raw(), buf, flags) } @@ -672,8 +673,9 @@ impl Socket { /// /// For more information, see [`send`], [`out_of_band_inline`]. /// - /// [`send`]: #method.send - /// [`out_of_band_inline`]: #method.out_of_band_inline + /// [`send`]: Socket::send + /// [`out_of_band_inline`]: Socket::out_of_band_inline + #[cfg_attr(target_os = "redox", allow(rustdoc::broken_intra_doc_links))] pub fn send_out_of_band(&self, buf: &[u8]) -> io::Result { self.send_with_flags(buf, sys::MSG_OOB) } @@ -1103,6 +1105,10 @@ impl Socket { /// [raw(7)]: https://man7.org/linux/man-pages/man7/raw.7.html /// [`IP_TTL`]: Socket::set_ttl /// [`IP_TOS`]: Socket::set_tos + #[cfg_attr( + any(target_os = "illumos", target_os = "solaris"), + allow(rustdoc::broken_intra_doc_links) + )] #[cfg(all(feature = "all", not(target_os = "redox")))] #[cfg_attr(docsrs, doc(cfg(all(feature = "all", not(target_os = "redox")))))] pub fn set_header_included(&self, included: bool) -> io::Result<()> { diff --git a/src/sys/unix.rs b/src/sys/unix.rs index 7d7223f1..6c4dd363 100644 --- a/src/sys/unix.rs +++ b/src/sys/unix.rs @@ -1221,6 +1221,15 @@ impl crate::Socket { /// # Notes /// /// On supported platforms you can use [`Type::cloexec`]. + #[cfg_attr( + any( + target_os = "ios", + target_os = "macos", + target_os = "tvos", + target_os = "watchos" + ), + allow(rustdoc::broken_intra_doc_links) + )] #[cfg(feature = "all")] #[cfg_attr(docsrs, doc(cfg(all(feature = "all", unix))))] pub fn set_cloexec(&self, close_on_exec: bool) -> io::Result<()> {