Skip to content

Commit

Permalink
doc(alias) pending() to never (#2613)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
danielhenrymantilla authored and taiki-e committed Aug 14, 2022
1 parent 724f58d commit a50f5dc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions futures-util/src/future/pending.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ impl<T> FusedFuture for Pending<T> {
/// unreachable!();
/// # });
/// ```
#[cfg_attr(docsrs, doc(alias = "never"))]
pub fn pending<T>() -> Pending<T> {
assert_future::<T, _>(Pending { _data: marker::PhantomData })
}
Expand Down

0 comments on commit a50f5dc

Please sign in to comment.