From 1e8a1dea4ce953058a2ced9aa74559af7063f456 Mon Sep 17 00:00:00 2001 From: Daniel Henry-Mantilla Date: Mon, 13 Jun 2022 18:15:03 +0200 Subject: [PATCH 1/2] `doc(alias)` `pending()` to `never` It can be legitimately to look for the future that _never_ resolves using the name `never`. This PR ensures `pending()` shows up when making such queries. cc @conradludgate --- futures-util/src/future/pending.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/futures-util/src/future/pending.rs b/futures-util/src/future/pending.rs index 92c78d52b8..f9a66d4ea0 100644 --- a/futures-util/src/future/pending.rs +++ b/futures-util/src/future/pending.rs @@ -33,6 +33,7 @@ impl FusedFuture for Pending { /// unreachable!(); /// # }); /// ``` +#[doc(alias = "never")] pub fn pending() -> Pending { assert_future::(Pending { _data: marker::PhantomData }) } From 8f01a49f8946221c09809aafd0d151e9103633c5 Mon Sep 17 00:00:00 2001 From: Daniel Henry-Mantilla Date: Thu, 7 Jul 2022 03:29:13 +0200 Subject: [PATCH 2/2] Fix MSRV breakage Co-authored-by: Taiki Endo --- futures-util/src/future/pending.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/futures-util/src/future/pending.rs b/futures-util/src/future/pending.rs index f9a66d4ea0..b8e28686e1 100644 --- a/futures-util/src/future/pending.rs +++ b/futures-util/src/future/pending.rs @@ -33,7 +33,7 @@ impl FusedFuture for Pending { /// unreachable!(); /// # }); /// ``` -#[doc(alias = "never")] +#[cfg_attr(docsrs, doc(alias = "never"))] pub fn pending() -> Pending { assert_future::(Pending { _data: marker::PhantomData }) }