From 4c4699be00bf4aee6218f84ec606e043286a8c2a Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Sun, 13 Sep 2020 15:50:40 +0200 Subject: [PATCH] doc: fix some links (#2834) --- tokio-util/src/lib.rs | 2 +- tokio/src/io/util/async_read_ext.rs | 2 +- tokio/src/net/udp/socket.rs | 4 ++-- tokio/src/sync/mod.rs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tokio-util/src/lib.rs b/tokio-util/src/lib.rs index 137be7a36..24a8af95f 100644 --- a/tokio-util/src/lib.rs +++ b/tokio-util/src/lib.rs @@ -6,7 +6,7 @@ rust_2018_idioms, unreachable_pub )] -#![deny(intra_doc_link_resolution_failure)] +#![cfg_attr(docsrs, deny(broken_intra_doc_links))] #![doc(test( no_crate_inject, attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables)) diff --git a/tokio/src/io/util/async_read_ext.rs b/tokio/src/io/util/async_read_ext.rs index dd280a188..0ab66c286 100644 --- a/tokio/src/io/util/async_read_ext.rs +++ b/tokio/src/io/util/async_read_ext.rs @@ -1067,7 +1067,7 @@ cfg_io_util! { /// (See also the [`crate::fs::read_to_string`] convenience function for /// reading from a file.) /// - /// [`crate::fs::read_to_string`]: crate::fs::read_to_string::read_to_string + /// [`crate::fs::read_to_string`]: fn@crate::fs::read_to_string fn read_to_string<'a>(&'a mut self, dst: &'a mut String) -> ReadToString<'a, Self> where Self: Unpin, diff --git a/tokio/src/net/udp/socket.rs b/tokio/src/net/udp/socket.rs index f9d883720..aeb25fb35 100644 --- a/tokio/src/net/udp/socket.rs +++ b/tokio/src/net/udp/socket.rs @@ -125,7 +125,7 @@ impl UdpSocket { /// should ensure that when the remote cannot receive, the /// [`ErrorKind::WouldBlock`] is properly handled. /// - /// [`ErrorKind::WouldBlock`]: std::io::error::ErrorKind::WouldBlock + /// [`ErrorKind::WouldBlock`]: std::io::ErrorKind::WouldBlock pub fn try_send(&self, buf: &[u8]) -> io::Result { self.io.get_ref().send(buf) } @@ -209,7 +209,7 @@ impl UdpSocket { /// [`ErrorKind::WouldBlock`] is properly handled. An error can also occur /// if the IP version of the socket does not match that of `target`. /// - /// [`ErrorKind::WouldBlock`]: std::io::error::ErrorKind::WouldBlock + /// [`ErrorKind::WouldBlock`]: std::io::ErrorKind::WouldBlock pub fn try_send_to(&self, buf: &[u8], target: SocketAddr) -> io::Result { self.io.get_ref().send_to(buf, &target) } diff --git a/tokio/src/sync/mod.rs b/tokio/src/sync/mod.rs index 522205a00..6dce9a7b8 100644 --- a/tokio/src/sync/mod.rs +++ b/tokio/src/sync/mod.rs @@ -397,8 +397,8 @@ //! } //! ``` //! -//! [`watch` channel]: crate::sync::watch -//! [`broadcast` channel]: crate::sync::broadcast +//! [`watch` channel]: mod@crate::sync::watch +//! [`broadcast` channel]: mod@crate::sync::broadcast //! //! # State synchronization //!