From c933d697d826dc917161881bdb651eedd6ca5ffc Mon Sep 17 00:00:00 2001 From: Camelid Date: Wed, 26 Aug 2020 12:25:19 -0700 Subject: [PATCH 1/3] Use intra-doc links in `core::future::future` --- library/core/src/future/future.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/library/core/src/future/future.rs b/library/core/src/future/future.rs index d9b91acc3ad..e279d80112a 100644 --- a/library/core/src/future/future.rs +++ b/library/core/src/future/future.rs @@ -23,7 +23,7 @@ use crate::task::{Context, Poll}; /// When using a future, you generally won't call `poll` directly, but instead /// `.await` the value. /// -/// [`Waker`]: ../task/struct.Waker.html +/// [`Waker`]: crate::task::Waker #[doc(spotlight)] #[must_use = "futures do nothing unless you `.await` or poll them"] #[stable(feature = "futures_api", since = "1.36.0")] @@ -91,11 +91,10 @@ pub trait Future { /// (memory corruption, incorrect use of `unsafe` functions, or the like), /// regardless of the future's state. /// - /// [`Poll::Pending`]: ../task/enum.Poll.html#variant.Pending - /// [`Poll::Ready(val)`]: ../task/enum.Poll.html#variant.Ready - /// [`Context`]: ../task/struct.Context.html - /// [`Waker`]: ../task/struct.Waker.html - /// [`Waker::wake`]: ../task/struct.Waker.html#method.wake + /// [`Poll::Pending`]: Poll::Pending + /// [`Poll::Ready(val)`]: Poll::Ready + /// [`Waker`]: crate::task::Waker + /// [`Waker::wake`]: crate::task::Waker::wake #[lang = "poll"] #[stable(feature = "futures_api", since = "1.36.0")] fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll; From 707298d52c2d4ef831a7987013f5a5517218c1ef Mon Sep 17 00:00:00 2001 From: Camelid Date: Wed, 26 Aug 2020 12:26:26 -0700 Subject: [PATCH 2/3] Use intra-doc links in `core::num::dec2flt` --- library/core/src/num/dec2flt/mod.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/library/core/src/num/dec2flt/mod.rs b/library/core/src/num/dec2flt/mod.rs index c83c6b0eccb..ed6202bb82f 100644 --- a/library/core/src/num/dec2flt/mod.rs +++ b/library/core/src/num/dec2flt/mod.rs @@ -166,10 +166,6 @@ from_str_float_impl!(f64); /// /// This error is used as the error type for the [`FromStr`] implementation /// for [`f32`] and [`f64`]. -/// -/// [`FromStr`]: ../str/trait.FromStr.html -/// [`f32`]: ../../std/primitive.f32.html -/// [`f64`]: ../../std/primitive.f64.html #[derive(Debug, Clone, PartialEq, Eq)] #[stable(feature = "rust1", since = "1.0.0")] pub struct ParseFloatError { From 39cd1846061a15905469cd99f22868a7935c8a03 Mon Sep 17 00:00:00 2001 From: Camelid <37223377+camelid@users.noreply.github.com> Date: Thu, 27 Aug 2020 19:42:23 -0700 Subject: [PATCH 3/3] Remove unnecessary intra-doc link Co-authored-by: Joshua Nelson --- library/core/src/future/future.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/library/core/src/future/future.rs b/library/core/src/future/future.rs index e279d80112a..e9a99ddb6b1 100644 --- a/library/core/src/future/future.rs +++ b/library/core/src/future/future.rs @@ -91,7 +91,6 @@ pub trait Future { /// (memory corruption, incorrect use of `unsafe` functions, or the like), /// regardless of the future's state. /// - /// [`Poll::Pending`]: Poll::Pending /// [`Poll::Ready(val)`]: Poll::Ready /// [`Waker`]: crate::task::Waker /// [`Waker::wake`]: crate::task::Waker::wake