Skip to content

Commit e9bda1d

Browse files
authored
Fix rustdoc::redundant_explicit_links warning (#2769)
1 parent 89c06f5 commit e9bda1d

File tree

4 files changed

+26
-27
lines changed

4 files changed

+26
-27
lines changed

futures-channel/src/mpsc/mod.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,27 +119,27 @@ impl<T> Unpin for BoundedSenderInner<T> {}
119119

120120
/// The transmission end of a bounded mpsc channel.
121121
///
122-
/// This value is created by the [`channel`](channel) function.
122+
/// This value is created by the [`channel`] function.
123123
pub struct Sender<T>(Option<BoundedSenderInner<T>>);
124124

125125
/// The transmission end of an unbounded mpsc channel.
126126
///
127-
/// This value is created by the [`unbounded`](unbounded) function.
127+
/// This value is created by the [`unbounded`] function.
128128
pub struct UnboundedSender<T>(Option<UnboundedSenderInner<T>>);
129129

130130
trait AssertKinds: Send + Sync + Clone {}
131131
impl AssertKinds for UnboundedSender<u32> {}
132132

133133
/// The receiving end of a bounded mpsc channel.
134134
///
135-
/// This value is created by the [`channel`](channel) function.
135+
/// This value is created by the [`channel`] function.
136136
pub struct Receiver<T> {
137137
inner: Option<Arc<BoundedInner<T>>>,
138138
}
139139

140140
/// The receiving end of an unbounded mpsc channel.
141141
///
142-
/// This value is created by the [`unbounded`](unbounded) function.
142+
/// This value is created by the [`unbounded`] function.
143143
pub struct UnboundedReceiver<T> {
144144
inner: Option<Arc<UnboundedInner<T>>>,
145145
}
@@ -337,9 +337,8 @@ impl SenderTask {
337337
/// guaranteed slot in the channel capacity, and on top of that there are
338338
/// `buffer` "first come, first serve" slots available to all senders.
339339
///
340-
/// The [`Receiver`](Receiver) returned implements the
341-
/// [`Stream`](futures_core::stream::Stream) trait, while [`Sender`](Sender) implements
342-
/// `Sink`.
340+
/// The [`Receiver`] returned implements the [`Stream`] trait, while [`Sender`]
341+
/// implements `Sink`.
343342
pub fn channel<T>(buffer: usize) -> (Sender<T>, Receiver<T>) {
344343
// Check that the requested buffer size does not exceed the maximum buffer
345344
// size permitted by the system.

futures-channel/src/oneshot.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ use crate::lock::Lock;
1414

1515
/// A future for a value that will be provided by another asynchronous task.
1616
///
17-
/// This is created by the [`channel`](channel) function.
17+
/// This is created by the [`channel`] function.
1818
#[must_use = "futures do nothing unless you `.await` or poll them"]
1919
pub struct Receiver<T> {
2020
inner: Arc<Inner<T>>,
2121
}
2222

2323
/// A means of transmitting a single value to another task.
2424
///
25-
/// This is created by the [`channel`](channel) function.
25+
/// This is created by the [`channel`] function.
2626
pub struct Sender<T> {
2727
inner: Arc<Inner<T>>,
2828
}
@@ -332,8 +332,8 @@ impl<T> Sender<T> {
332332
/// Completes this oneshot with a successful result.
333333
///
334334
/// This function will consume `self` and indicate to the other end, the
335-
/// [`Receiver`](Receiver), that the value provided is the result of the
336-
/// computation this represents.
335+
/// [`Receiver`], that the value provided is the result of the computation
336+
/// this represents.
337337
///
338338
/// If the value is successfully enqueued for the remote end to receive,
339339
/// then `Ok(())` is returned. If the receiving end was dropped before
@@ -343,7 +343,7 @@ impl<T> Sender<T> {
343343
}
344344

345345
/// Polls this `Sender` half to detect whether its associated
346-
/// [`Receiver`](Receiver) has been dropped.
346+
/// [`Receiver`] has been dropped.
347347
///
348348
/// # Return values
349349
///
@@ -359,10 +359,10 @@ impl<T> Sender<T> {
359359
}
360360

361361
/// Creates a future that resolves when this `Sender`'s corresponding
362-
/// [`Receiver`](Receiver) half has hung up.
362+
/// [`Receiver`] half has hung up.
363363
///
364364
/// This is a utility wrapping [`poll_canceled`](Sender::poll_canceled)
365-
/// to expose a [`Future`](core::future::Future).
365+
/// to expose a [`Future`].
366366
pub fn cancellation(&mut self) -> Cancellation<'_, T> {
367367
Cancellation { inner: self }
368368
}
@@ -413,8 +413,8 @@ impl<T> Future for Cancellation<'_, T> {
413413
}
414414
}
415415

416-
/// Error returned from a [`Receiver`](Receiver) when the corresponding
417-
/// [`Sender`](Sender) is dropped.
416+
/// Error returned from a [`Receiver`] when the corresponding [`Sender`] is
417+
/// dropped.
418418
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
419419
pub struct Canceled;
420420

futures-test/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ mod interleave_pending;
6161
mod track_closed;
6262

6363
/// Enables an `async` test function. The generated future will be run to completion with
64-
/// [`futures_executor::block_on`](futures_executor::block_on).
64+
/// [`futures_executor::block_on`].
6565
///
6666
/// ```
6767
/// #[futures_test::test]

futures-test/src/task/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,29 @@
1515
//! [`Spawn`](futures_task::Spawn) implementations.
1616
//!
1717
//! Test contexts:
18-
//! - [`noop_context`](crate::task::noop_context) creates a context that ignores calls to
18+
//! - [`noop_context`] creates a context that ignores calls to
1919
//! [`cx.waker().wake_by_ref()`](futures_core::task::Waker).
20-
//! - [`panic_context`](crate::task::panic_context) creates a context that panics when
20+
//! - [`panic_context`] creates a context that panics when
2121
//! [`cx.waker().wake_by_ref()`](futures_core::task::Waker) is called.
2222
//!
2323
//! Test wakers:
24-
//! - [`noop_waker`](crate::task::noop_waker) creates a waker that ignores calls to
24+
//! - [`noop_waker`] creates a waker that ignores calls to
2525
//! [`wake`](futures_core::task::Waker).
26-
//! - [`panic_waker`](crate::task::panic_waker()) creates a waker that panics when
26+
//! - [`panic_waker`](panic_waker()) creates a waker that panics when
2727
//! [`wake`](futures_core::task::Waker) is called.
28-
//! - [`new_count_waker`](crate::task::new_count_waker) creates a waker that increments a counter whenever
28+
//! - [`new_count_waker`] creates a waker that increments a counter whenever
2929
//! [`wake`](futures_core::task::Waker) is called.
3030
//!
3131
//! Test spawners:
32-
//! - [`NoopSpawner`](crate::task::NoopSpawner) ignores calls to
32+
//! - [`NoopSpawner`] ignores calls to
3333
//! [`spawn`](futures_util::task::SpawnExt::spawn)
34-
//! - [`PanicSpawner`](crate::task::PanicSpawner) panics if [`spawn`](futures_util::task::SpawnExt::spawn) is
34+
//! - [`PanicSpawner`] panics if [`spawn`](futures_util::task::SpawnExt::spawn) is
3535
//! called.
36-
//! - [`RecordSpawner`](crate::task::RecordSpawner) records the spawned futures.
36+
//! - [`RecordSpawner`] records the spawned futures.
3737
//!
3838
//! For convenience there additionally exist various functions that directly
39-
//! return waker/spawner references: [`noop_waker_ref`](crate::task::noop_waker_ref),
40-
//! [`panic_waker_ref`](crate::task::panic_waker_ref), [`noop_spawner_mut`](crate::task::noop_spawner_mut) and [`panic_spawner_mut`](crate::task::panic_spawner_mut).
39+
//! return waker/spawner references: [`noop_waker_ref`], [`panic_waker_ref`],
40+
//! [`noop_spawner_mut`] and [`panic_spawner_mut`].
4141
4242
mod context;
4343
pub use self::context::{noop_context, panic_context};

0 commit comments

Comments
 (0)