From 76ec3f8d2b9b1ae547652762d8ab5909eaa5793d Mon Sep 17 00:00:00 2001 From: Alexis Bourget Date: Thu, 17 Sep 2020 17:25:06 +0200 Subject: [PATCH 1/2] Move to intra doc links in core/src/future --- library/core/src/future/pending.rs | 2 -- library/core/src/future/poll_fn.rs | 2 -- library/core/src/future/ready.rs | 2 -- 3 files changed, 6 deletions(-) diff --git a/library/core/src/future/pending.rs b/library/core/src/future/pending.rs index 4fec219ede2..388b9e7bdb0 100644 --- a/library/core/src/future/pending.rs +++ b/library/core/src/future/pending.rs @@ -9,8 +9,6 @@ use crate::task::{Context, Poll}; /// /// This `struct` is created by the [`pending`] function. See its /// documentation for more. -/// -/// [`pending`]: fn.pending.html #[stable(feature = "future_readiness_fns", since = "1.48.0")] #[must_use = "futures do nothing unless you `.await` or poll them"] pub struct Pending { diff --git a/library/core/src/future/poll_fn.rs b/library/core/src/future/poll_fn.rs index 9ab3bfcea1c..3fe7eb88d0f 100644 --- a/library/core/src/future/poll_fn.rs +++ b/library/core/src/future/poll_fn.rs @@ -35,8 +35,6 @@ where /// /// This `struct` is created by the [`poll_fn`] function. See its /// documentation for more. -/// -/// [`poll_fn`]: fn.poll_fn.html #[must_use = "futures do nothing unless you `.await` or poll them"] #[unstable(feature = "future_poll_fn", issue = "72302")] pub struct PollFn { diff --git a/library/core/src/future/ready.rs b/library/core/src/future/ready.rs index fcfd8779b0a..ad93157c345 100644 --- a/library/core/src/future/ready.rs +++ b/library/core/src/future/ready.rs @@ -6,8 +6,6 @@ use crate::task::{Context, Poll}; /// /// This `struct` is created by the [`ready`] function. See its /// documentation for more. -/// -/// [`ready`]: fn.ready.html #[stable(feature = "future_readiness_fns", since = "1.48.0")] #[derive(Debug, Clone)] #[must_use = "futures do nothing unless you `.await` or poll them"] From 4c92b3dc7d189bdff8f7e78be293d03e43466621 Mon Sep 17 00:00:00 2001 From: Poliorcetics Date: Fri, 18 Sep 2020 09:52:35 +0200 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Joshua Nelson --- library/core/src/future/pending.rs | 2 +- library/core/src/future/poll_fn.rs | 2 +- library/core/src/future/ready.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/core/src/future/pending.rs b/library/core/src/future/pending.rs index 388b9e7bdb0..ab162638a1c 100644 --- a/library/core/src/future/pending.rs +++ b/library/core/src/future/pending.rs @@ -7,7 +7,7 @@ use crate::task::{Context, Poll}; /// Creates a future which never resolves, representing a computation that never /// finishes. /// -/// This `struct` is created by the [`pending`] function. See its +/// This `struct` is created by [`pending()`]. See its /// documentation for more. #[stable(feature = "future_readiness_fns", since = "1.48.0")] #[must_use = "futures do nothing unless you `.await` or poll them"] diff --git a/library/core/src/future/poll_fn.rs b/library/core/src/future/poll_fn.rs index 3fe7eb88d0f..f302cda09e7 100644 --- a/library/core/src/future/poll_fn.rs +++ b/library/core/src/future/poll_fn.rs @@ -33,7 +33,7 @@ where /// A Future that wraps a function returning `Poll`. /// -/// This `struct` is created by the [`poll_fn`] function. See its +/// This `struct` is created by [`poll_fn()`]. See its /// documentation for more. #[must_use = "futures do nothing unless you `.await` or poll them"] #[unstable(feature = "future_poll_fn", issue = "72302")] diff --git a/library/core/src/future/ready.rs b/library/core/src/future/ready.rs index ad93157c345..e98f5c570bf 100644 --- a/library/core/src/future/ready.rs +++ b/library/core/src/future/ready.rs @@ -4,7 +4,7 @@ use crate::task::{Context, Poll}; /// Creates a future that is immediately ready with a value. /// -/// This `struct` is created by the [`ready`] function. See its +/// This `struct` is created by [`ready()`]. See its /// documentation for more. #[stable(feature = "future_readiness_fns", since = "1.48.0")] #[derive(Debug, Clone)]