We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e24e0b commit b4fc5caCopy full SHA for b4fc5ca
src/future/pending.rs
@@ -1,6 +1,6 @@
1
-use std::future::Future;
2
-use std::marker::PhantomData;
3
-use std::pin::Pin;
+use core::future::Future;
+use core::marker::PhantomData;
+use core::pin::Pin;
4
5
use crate::task::{Context, Poll};
6
@@ -24,14 +24,17 @@ use crate::task::{Context, Poll};
24
/// #
25
/// # })
26
/// ```
27
-pub async fn pending<T>() -> T {
28
- let fut = Pending {
+pub fn pending<T>() -> Pending<T> {
+ Pending {
29
_marker: PhantomData,
30
- };
31
- fut.await
+ }
32
}
33
34
-struct Pending<T> {
+/// This future is constructed by the [`pending`] function.
+///
35
+/// [`pending`]: fn.pending.html
36
+#[derive(Debug)]
37
+pub struct Pending<T> {
38
_marker: PhantomData<T>,
39
40
0 commit comments