docs: use intra-links in the docs (#2575)

This commit is contained in:
xliiv
2020-05-31 18:49:04 +02:00
committed by GitHub
parent 9264b837d8
commit e70a1b6d64
17 changed files with 26 additions and 26 deletions
+1 -1
View File
@@ -370,7 +370,7 @@
//! [`AsyncRead`]: trait@tokio::io::AsyncRead //! [`AsyncRead`]: trait@tokio::io::AsyncRead
//! [`AsyncWrite`]: trait@tokio::io::AsyncWrite //! [`AsyncWrite`]: trait@tokio::io::AsyncWrite
//! [`Encoder`]: trait@Encoder //! [`Encoder`]: trait@Encoder
//! [`BytesMut`]: https://docs.rs/bytes/0.4/bytes/struct.BytesMut.html //! [`BytesMut`]: bytes::BytesMut
use crate::codec::{Decoder, Encoder, Framed, FramedRead, FramedWrite}; use crate::codec::{Decoder, Encoder, Framed, FramedRead, FramedWrite};
+1 -1
View File
@@ -45,7 +45,7 @@
//! other futures. By doing this, you avoid double-counting each iteration of //! other futures. By doing this, you avoid double-counting each iteration of
//! the outer future against the cooperating budget. //! the outer future against the cooperating budget.
//! //!
//! [`poll`]: https://doc.rust-lang.org/std/future/trait.Future.html#tymethod.poll //! [`poll`]: method@std::future::Future::poll
// NOTE: The doctests in this module are ignored since the whole module is (currently) private. // NOTE: The doctests in this module are ignored since the whole module is (currently) private.
+1 -1
View File
@@ -7,7 +7,7 @@ use std::path::Path;
/// ///
/// This is an async version of [`std::fs::remove_dir_all`][std] /// This is an async version of [`std::fs::remove_dir_all`][std]
/// ///
/// [std]: https://doc.rust-lang.org/std/fs/fn.remove_dir_all.html /// [std]: fn@std::fs::remove_dir_all
pub async fn remove_dir_all(path: impl AsRef<Path>) -> io::Result<()> { pub async fn remove_dir_all(path: impl AsRef<Path>) -> io::Result<()> {
let path = path.as_ref().to_owned(); let path = path.as_ref().to_owned();
asyncify(move || std::fs::remove_dir_all(path)).await asyncify(move || std::fs::remove_dir_all(path)).await
+1 -1
View File
@@ -8,7 +8,7 @@ use std::path::Path;
/// ///
/// This is an async version of [`std::fs::set_permissions`][std] /// This is an async version of [`std::fs::set_permissions`][std]
/// ///
/// [std]: https://doc.rust-lang.org/std/fs/fn.set_permissions.html /// [std]: fn@std::fs::set_permissions
pub async fn set_permissions(path: impl AsRef<Path>, perm: Permissions) -> io::Result<()> { pub async fn set_permissions(path: impl AsRef<Path>, perm: Permissions) -> io::Result<()> {
let path = path.as_ref().to_owned(); let path = path.as_ref().to_owned();
asyncify(|| std::fs::set_permissions(path, perm)).await asyncify(|| std::fs::set_permissions(path, perm)).await
+1 -1
View File
@@ -8,7 +8,7 @@ use std::path::Path;
/// ///
/// This is an async version of [`std::fs::symlink_metadata`][std] /// This is an async version of [`std::fs::symlink_metadata`][std]
/// ///
/// [std]: https://doc.rust-lang.org/std/fs/fn.symlink_metadata.html /// [std]: fn@std::fs::symlink_metadata
pub async fn symlink_metadata(path: impl AsRef<Path>) -> io::Result<Metadata> { pub async fn symlink_metadata(path: impl AsRef<Path>) -> io::Result<Metadata> {
let path = path.as_ref().to_owned(); let path = path.as_ref().to_owned();
asyncify(|| std::fs::symlink_metadata(path)).await asyncify(|| std::fs::symlink_metadata(path)).await
+2 -2
View File
@@ -57,7 +57,7 @@
//! [`File`]: crate::fs::File //! [`File`]: crate::fs::File
//! [`TcpStream`]: crate::net::TcpStream //! [`TcpStream`]: crate::net::TcpStream
//! [`std::fs::File`]: std::fs::File //! [`std::fs::File`]: std::fs::File
//! [std_example]: https://doc.rust-lang.org/std/io/index.html#read-and-write //! [std_example]: std::io#read-and-write
//! //!
//! ## Buffered Readers and Writers //! ## Buffered Readers and Writers
//! //!
@@ -114,7 +114,7 @@
//! } //! }
//! ``` //! ```
//! //!
//! [stdbuf]: https://doc.rust-lang.org/std/io/index.html#bufreader-and-bufwriter //! [stdbuf]: std::io#bufreader-and-bufwriter
//! [`std::io::BufRead`]: std::io::BufRead //! [`std::io::BufRead`]: std::io::BufRead
//! [`AsyncBufRead`]: crate::io::AsyncBufRead //! [`AsyncBufRead`]: crate::io::AsyncBufRead
//! [`BufReader`]: crate::io::BufReader //! [`BufReader`]: crate::io::BufReader
+3 -3
View File
@@ -90,11 +90,11 @@ cfg_io_driver! {
/// These events are included as part of the read readiness event stream. The /// These events are included as part of the read readiness event stream. The
/// write readiness event stream is only for `Ready::writable()` events. /// write readiness event stream is only for `Ready::writable()` events.
/// ///
/// [`std::io::Read`]: https://doc.rust-lang.org/std/io/trait.Read.html /// [`std::io::Read`]: trait@std::io::Read
/// [`std::io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html /// [`std::io::Write`]: trait@std::io::Write
/// [`AsyncRead`]: trait@AsyncRead /// [`AsyncRead`]: trait@AsyncRead
/// [`AsyncWrite`]: trait@AsyncWrite /// [`AsyncWrite`]: trait@AsyncWrite
/// [`mio::Evented`]: https://docs.rs/mio/0.6/mio/trait.Evented.html /// [`mio::Evented`]: trait@mio::Evented
/// [`Registration`]: struct@Registration /// [`Registration`]: struct@Registration
/// [`TcpListener`]: struct@crate::net::TcpListener /// [`TcpListener`]: struct@crate::net::TcpListener
/// [`clear_read_ready`]: method@Self::clear_read_ready /// [`clear_read_ready`]: method@Self::clear_read_ready
+2 -2
View File
@@ -166,7 +166,7 @@ impl Registration {
/// * `Poll::Ready(Err(err))` means that the registration has encountered an /// * `Poll::Ready(Err(err))` means that the registration has encountered an
/// error. This could represent a permanent internal error for example. /// error. This could represent a permanent internal error for example.
/// ///
/// [edge-triggered]: https://docs.rs/mio/0.6/mio/struct.Poll.html#edge-triggered-and-level-triggered /// [edge-triggered]: struct@mio::Poll#edge-triggered-and-level-triggered
/// ///
/// # Panics /// # Panics
/// ///
@@ -222,7 +222,7 @@ impl Registration {
/// * `Poll::Ready(Err(err))` means that the registration has encountered an /// * `Poll::Ready(Err(err))` means that the registration has encountered an
/// error. This could represent a permanent internal error for example. /// error. This could represent a permanent internal error for example.
/// ///
/// [edge-triggered]: https://docs.rs/mio/0.6/mio/struct.Poll.html#edge-triggered-and-level-triggered /// [edge-triggered]: struct@mio::Poll#edge-triggered-and-level-triggered
/// ///
/// # Panics /// # Panics
/// ///
+1 -1
View File
@@ -43,7 +43,7 @@
/// Pinning is useful when using `select!` and stream operators that require `T: /// Pinning is useful when using `select!` and stream operators that require `T:
/// Stream + Unpin`. /// Stream + Unpin`.
/// ///
/// [`Future`]: https://doc.rust-lang.org/std/future/trait.Future.html /// [`Future`]: trait@std::future::Future
/// [`Box::pin`]: # /// [`Box::pin`]: #
/// ///
/// # Usage /// # Usage
+2 -2
View File
@@ -1,6 +1,6 @@
//! [`UdpSocket`](../struct.UdpSocket.html) split support. //! [`UdpSocket`](crate::net::UdpSocket) split support.
//! //!
//! The [`split`](../struct.UdpSocket.html#method.split) method splits a //! The [`split`](method@crate::net::UdpSocket::split) method splits a
//! `UdpSocket` into a receive half and a send half, which can be used to //! `UdpSocket` into a receive half and a send half, which can be used to
//! receive and send datagrams concurrently, even from two different tasks. //! receive and send datagrams concurrently, even from two different tasks.
//! //!
+1 -1
View File
@@ -401,7 +401,7 @@ pub struct Signal {
/// * If the lower-level C functions fail for some reason. /// * If the lower-level C functions fail for some reason.
/// * If the previous initialization of this specific signal failed. /// * If the previous initialization of this specific signal failed.
/// * If the signal is one of /// * If the signal is one of
/// [`signal_hook::FORBIDDEN`](https://docs.rs/signal-hook/*/signal_hook/fn.register.html#panics) /// [`signal_hook::FORBIDDEN`](fn@signal_hook_registry::register#panics)
pub fn signal(kind: SignalKind) -> io::Result<Signal> { pub fn signal(kind: SignalKind) -> io::Result<Signal> {
let signal = kind.0; let signal = kind.0;
+3 -3
View File
@@ -93,9 +93,9 @@ use std::sync::Arc;
/// ///
/// [`Mutex`]: struct@Mutex /// [`Mutex`]: struct@Mutex
/// [`MutexGuard`]: struct@MutexGuard /// [`MutexGuard`]: struct@MutexGuard
/// [`Arc`]: https://doc.rust-lang.org/std/sync/struct.Arc.html /// [`Arc`]: struct@std::sync::Arc
/// [`std::sync::Mutex`]: https://doc.rust-lang.org/std/sync/struct.Mutex.html /// [`std::sync::Mutex`]: struct@std::sync::Mutex
/// [`Send`]: https://doc.rust-lang.org/std/marker/trait.Send.html /// [`Send`]: trait@std::marker::Send
/// [`lock`]: method@Mutex::lock /// [`lock`]: method@Mutex::lock
#[derive(Debug)] #[derive(Debug)]
+3 -3
View File
@@ -31,8 +31,8 @@ const MAX_READS: usize = 10;
/// ///
/// The type parameter `T` represents the data that this lock protects. It is /// The type parameter `T` represents the data that this lock protects. It is
/// required that `T` satisfies [`Send`] to be shared across threads. The RAII guards /// required that `T` satisfies [`Send`] to be shared across threads. The RAII guards
/// returned from the locking methods implement [`Deref`](https://doc.rust-lang.org/std/ops/trait.Deref.html) /// returned from the locking methods implement [`Deref`](trait@std::ops::Deref)
/// (and [`DerefMut`](https://doc.rust-lang.org/std/ops/trait.DerefMut.html) /// (and [`DerefMut`](trait@std::ops::DerefMut)
/// for the `write` methods) to allow access to the content of the lock. /// for the `write` methods) to allow access to the content of the lock.
/// ///
/// # Examples /// # Examples
@@ -65,7 +65,7 @@ const MAX_READS: usize = 10;
/// [`RwLock`]: struct@RwLock /// [`RwLock`]: struct@RwLock
/// [`RwLockReadGuard`]: struct@RwLockReadGuard /// [`RwLockReadGuard`]: struct@RwLockReadGuard
/// [`RwLockWriteGuard`]: struct@RwLockWriteGuard /// [`RwLockWriteGuard`]: struct@RwLockWriteGuard
/// [`Send`]: https://doc.rust-lang.org/std/marker/trait.Send.html /// [`Send`]: trait@std::marker::Send
/// [_write-preferring_]: https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock#Priority_policies /// [_write-preferring_]: https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock#Priority_policies
#[derive(Debug)] #[derive(Debug)]
pub struct RwLock<T> { pub struct RwLock<T> {
+1 -1
View File
@@ -29,7 +29,7 @@ cfg_rt_threaded! {
/// [blocking]: ../index.html#cpu-bound-tasks-and-blocking-code /// [blocking]: ../index.html#cpu-bound-tasks-and-blocking-code
/// [threaded scheduler]: fn@crate::runtime::Builder::threaded_scheduler /// [threaded scheduler]: fn@crate::runtime::Builder::threaded_scheduler
/// [`spawn_blocking`]: fn@crate::task::spawn_blocking /// [`spawn_blocking`]: fn@crate::task::spawn_blocking
/// [`join!`]: ../macro.join.html /// [`join!`]: macro@join
/// [`thread::spawn`]: fn@std::thread::spawn /// [`thread::spawn`]: fn@std::thread::spawn
/// [`shutdown_timeout`]: fn@crate::runtime::Runtime::shutdown_timeout /// [`shutdown_timeout`]: fn@crate::runtime::Runtime::shutdown_timeout
/// ///
+1 -1
View File
@@ -105,7 +105,7 @@ cfg_rt_util! {
/// } /// }
/// ``` /// ```
/// ///
/// [`Send`]: https://doc.rust-lang.org/std/marker/trait.Send.html /// [`Send`]: trait@std::marker::Send
/// [local task set]: struct@LocalSet /// [local task set]: struct@LocalSet
/// [`Runtime::block_on`]: method@crate::runtime::Runtime::block_on /// [`Runtime::block_on`]: method@crate::runtime::Runtime::block_on
/// [`task::spawn_local`]: fn@spawn_local /// [`task::spawn_local`]: fn@spawn_local
+1 -1
View File
@@ -89,7 +89,7 @@ macro_rules! __task_local_inner {
/// }).await; /// }).await;
/// # } /// # }
/// ``` /// ```
/// [`std::thread::LocalKey`]: https://doc.rust-lang.org/std/thread/struct.LocalKey.html /// [`std::thread::LocalKey`]: struct@std::thread::LocalKey
pub struct LocalKey<T: 'static> { pub struct LocalKey<T: 'static> {
#[doc(hidden)] #[doc(hidden)]
pub inner: thread::LocalKey<RefCell<Option<T>>>, pub inner: thread::LocalKey<RefCell<Option<T>>>,
+1 -1
View File
@@ -119,7 +119,7 @@ use std::task::{self, Poll};
/// [`Stream::poll`]: method@Self::poll /// [`Stream::poll`]: method@Self::poll
/// [`DelayQueue`]: struct@DelayQueue /// [`DelayQueue`]: struct@DelayQueue
/// [`delay_for`]: fn@super::delay_for /// [`delay_for`]: fn@super::delay_for
/// [`slab`]: https://docs.rs/slab /// [`slab`]: slab
/// [`capacity`]: method@Self::capacity /// [`capacity`]: method@Self::capacity
/// [`reserve`]: method@Self::reserve /// [`reserve`]: method@Self::reserve
#[derive(Debug)] #[derive(Debug)]