Skip to content

Commit 1e50629

Browse files
authored
Rollup merge of rust-lang#51853 - MajorBreakfast:fix-doc-links, r=cramertj
Fix some doc links The futures crate CI always fails because of these intra doc links. I hope that this will fix this issue. r? @steveklabnik @cramertj Edit: I added @steveklabnik as reviewer because this PR also adjusts a link in `src/libstd/error.rs`
2 parents 0f83438 + 30d825c commit 1e50629

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/libcore/future.rs

+9-5
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,18 @@ pub trait Future {
4545
///
4646
/// This function returns:
4747
///
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.
5151
///
5252
/// Once a future has finished, clients should not `poll` it again.
5353
///
5454
/// 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
5656
/// interest of the current task in the value being produced. For example,
5757
/// if the future represents the availability of data on a socket, then the
5858
/// 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,
6060
/// it should attempt to `poll` the future again, which may or may not
6161
/// produce a final value.
6262
///
@@ -90,6 +90,10 @@ pub trait Future {
9090
/// then any future calls to `poll` may panic, block forever, or otherwise
9191
/// cause bad behavior. The `Future` trait itself provides no guarantees
9292
/// 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
9397
fn poll(self: PinMut<Self>, cx: &mut task::Context) -> Poll<Self::Output>;
9498
}
9599

src/libstd/error.rs

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ use string;
4949
///
5050
/// [`Result<T, E>`]: ../result/enum.Result.html
5151
/// [`Display`]: ../fmt/trait.Display.html
52+
/// [`Debug`]: ../fmt/trait.Debug.html
5253
/// [`cause`]: trait.Error.html#method.cause
5354
#[stable(feature = "rust1", since = "1.0.0")]
5455
pub trait Error: Debug + Display {

0 commit comments

Comments
 (0)