@@ -45,18 +45,18 @@ pub trait Future {
45
45
///
46
46
/// This function returns:
47
47
///
48
- /// - `Poll::Pending` if the future is not ready yet
49
- /// - `Poll::Ready(val)` with the result `val` of this future if it finished
50
- /// successfully.
48
+ /// - [ `Poll::Pending`] if the future is not ready yet
49
+ /// - [ `Poll::Ready(val)`] with the result `val` of this future if it
50
+ /// finished successfully.
51
51
///
52
52
/// Once a future has finished, clients should not `poll` it again.
53
53
///
54
54
/// When a future is not ready yet, `poll` returns
55
- /// [ `Poll::Pending`](::task::Poll) . The future will *also* register the
55
+ /// `Poll::Pending`. The future will *also* register the
56
56
/// interest of the current task in the value being produced. For example,
57
57
/// if the future represents the availability of data on a socket, then the
58
58
/// task is recorded so that when data arrives, it is woken up (via
59
- /// [`cx.waker()`](::task::Context::waker) ). Once a task has been woken up,
59
+ /// [`cx.waker()`]). Once a task has been woken up,
60
60
/// it should attempt to `poll` the future again, which may or may not
61
61
/// produce a final value.
62
62
///
@@ -90,6 +90,10 @@ pub trait Future {
90
90
/// then any future calls to `poll` may panic, block forever, or otherwise
91
91
/// cause bad behavior. The `Future` trait itself provides no guarantees
92
92
/// about the behavior of `poll` after a future has completed.
93
+ ///
94
+ /// [`Poll::Pending`]: ../task/enum.Poll.html#variant.Pending
95
+ /// [`Poll::Ready(val)`]: ../task/enum.Poll.html#variant.Ready
96
+ /// [`cx.waker()`]: ../task/struct.Context.html#method.waker
93
97
fn poll ( self : PinMut < Self > , cx : & mut task:: Context ) -> Poll < Self :: Output > ;
94
98
}
95
99
0 commit comments