diff --git a/src/future/pending.rs b/src/future/pending.rs index 968972b5..f3a3379d 100644 --- a/src/future/pending.rs +++ b/src/future/pending.rs @@ -1,6 +1,6 @@ -use std::future::Future; -use std::marker::PhantomData; -use std::pin::Pin; +use core::future::Future; +use core::marker::PhantomData; +use core::pin::Pin; use crate::task::{Context, Poll}; @@ -24,14 +24,17 @@ use crate::task::{Context, Poll}; /// # /// # }) /// ``` -pub async fn pending() -> T { - let fut = Pending { +pub fn pending() -> Pending { + Pending { _marker: PhantomData, - }; - fut.await + } } -struct Pending { +/// This future is constructed by the [`pending`] function. +/// +/// [`pending`]: fn.pending.html +#[derive(Debug)] +pub struct Pending { _marker: PhantomData, }