diff options
author | xliiv <tymoteusz.jankowski@gmail.com> | 2020-04-12 19:25:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-12 10:25:55 -0700 |
commit | f39c15334e74b07a44efaa0f7201262e17e4f062 (patch) | |
tree | c13b2949b0a82d4443d83b724d7f99bae13a035e /tokio/src/sync | |
parent | 060d22bd10ac66d91b70522138816c9bd05d5ead (diff) |
docs: replace some html links with rustdoc paths (#2381)
Included changes
- all simple references like `<type>.<name>.html` for these types
- enum
- fn
- struct
- trait
- type
- simple references for methods, like struct.DelayQueue.html#method.poll
Refs: #1473
Diffstat (limited to 'tokio/src/sync')
-rw-r--r-- | tokio/src/sync/mutex.rs | 4 | ||||
-rw-r--r-- | tokio/src/sync/oneshot.rs | 4 | ||||
-rw-r--r-- | tokio/src/sync/rwlock.rs | 14 | ||||
-rw-r--r-- | tokio/src/sync/watch.rs | 12 |
4 files changed, 17 insertions, 17 deletions
diff --git a/tokio/src/sync/mutex.rs b/tokio/src/sync/mutex.rs index 6b51b405..7167906d 100644 --- a/tokio/src/sync/mutex.rs +++ b/tokio/src/sync/mutex.rs @@ -76,8 +76,8 @@ //! case, the mutex will be unlocked. If the panic is caught, this might leave //! the data protected by the mutex in an inconsistent state. //! -//! [`Mutex`]: struct.Mutex.html -//! [`MutexGuard`]: struct.MutexGuard.html +//! [`Mutex`]: struct@Mutex +//! [`MutexGuard`]: struct@MutexGuard use crate::coop::CoopFutureExt; use crate::sync::batch_semaphore as semaphore; diff --git a/tokio/src/sync/oneshot.rs b/tokio/src/sync/oneshot.rs index 644832b9..62ad484e 100644 --- a/tokio/src/sync/oneshot.rs +++ b/tokio/src/sync/oneshot.rs @@ -16,7 +16,7 @@ use std::task::{Context, Poll, Waker}; /// Sends a value to the associated `Receiver`. /// -/// Instances are created by the [`channel`](fn.channel.html) function. +/// Instances are created by the [`channel`](fn@channel) function. #[derive(Debug)] pub struct Sender<T> { inner: Option<Arc<Inner<T>>>, @@ -24,7 +24,7 @@ pub struct Sender<T> { /// Receive a value from the associated `Sender`. /// -/// Instances are created by the [`channel`](fn.channel.html) function. +/// Instances are created by the [`channel`](fn@channel) function. #[derive(Debug)] pub struct Receiver<T> { inner: Option<Arc<Inner<T>>>, diff --git a/tokio/src/sync/rwlock.rs b/tokio/src/sync/rwlock.rs index 0f7991a5..68cf710e 100644 --- a/tokio/src/sync/rwlock.rs +++ b/tokio/src/sync/rwlock.rs @@ -62,10 +62,10 @@ const MAX_READS: usize = 10; /// } /// ``` /// -/// [`Mutex`]: struct.Mutex.html -/// [`RwLock`]: struct.RwLock.html -/// [`RwLockReadGuard`]: struct.RwLockReadGuard.html -/// [`RwLockWriteGuard`]: struct.RwLockWriteGuard.html +/// [`Mutex`]: struct@super::Mutex +/// [`RwLock`]: struct@RwLock +/// [`RwLockReadGuard`]: struct@RwLockReadGuard +/// [`RwLockWriteGuard`]: struct@RwLockWriteGuard /// [`Send`]: https://doc.rust-lang.org/std/marker/trait.Send.html /// [_write-preferring_]: https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock#Priority_policies #[derive(Debug)] @@ -83,7 +83,7 @@ pub struct RwLock<T> { /// This structure is created by the [`read`] method on /// [`RwLock`]. /// -/// [`read`]: struct.RwLock.html#method.read +/// [`read`]: method@RwLock::read #[derive(Debug)] pub struct RwLockReadGuard<'a, T> { permit: ReleasingPermit<'a, T>, @@ -96,8 +96,8 @@ pub struct RwLockReadGuard<'a, T> { /// This structure is created by the [`write`] and method /// on [`RwLock`]. /// -/// [`write`]: struct.RwLock.html#method.write -/// [`RwLock`]: struct.RwLock.html +/// [`write`]: method@RwLock::write +/// [`RwLock`]: struct@RwLock #[derive(Debug)] pub struct RwLockWriteGuard<'a, T> { permit: ReleasingPermit<'a, T>, diff --git a/tokio/src/sync/watch.rs b/tokio/src/sync/watch.rs index 402670f4..ba609a8c 100644 --- a/tokio/src/sync/watch.rs +++ b/tokio/src/sync/watch.rs @@ -62,9 +62,9 @@ use std::sync::{Arc, Mutex, RwLock, RwLockReadGuard, Weak}; use std::task::Poll::{Pending, Ready}; use std::task::{Context, Poll}; -/// Receives values from the associated [`Sender`](struct.Sender.html). +/// Receives values from the associated [`Sender`](struct@Sender). /// -/// Instances are created by the [`channel`](fn.channel.html) function. +/// Instances are created by the [`channel`](fn@channel) function. #[derive(Debug)] pub struct Receiver<T> { /// Pointer to the shared state @@ -74,9 +74,9 @@ pub struct Receiver<T> { inner: Watcher, } -/// Sends values to the associated [`Receiver`](struct.Receiver.html). +/// Sends values to the associated [`Receiver`](struct@Receiver). /// -/// Instances are created by the [`channel`](fn.channel.html) function. +/// Instances are created by the [`channel`](fn@channel) function. #[derive(Debug)] pub struct Sender<T> { shared: Weak<Shared<T>>, @@ -172,8 +172,8 @@ const CLOSED: usize = 1; /// # } /// ``` /// -/// [`Sender`]: struct.Sender.html -/// [`Receiver`]: struct.Receiver.html +/// [`Sender`]: struct@Sender +/// [`Receiver`]: struct@Receiver pub fn channel<T: Clone>(init: T) -> (Sender<T>, Receiver<T>) { const VERSION_0: usize = 0; const VERSION_1: usize = 2; |