diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2018-07-01 21:18:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-01 21:18:45 +0200 |
| commit | 1e5062977219314f5dc28b3e2f0b1cb4e135ec55 (patch) | |
| tree | 9539e2465c68384052f0c25eb72b2cd99aaa8daf | |
| parent | 0f8343830b0f40026dae00ceaf01258e0e4923b5 (diff) | |
| parent | 30d825ce72c6e56a3c82f338897a437eaa8cd882 (diff) | |
| download | rust-1e5062977219314f5dc28b3e2f0b1cb4e135ec55.tar.gz rust-1e5062977219314f5dc28b3e2f0b1cb4e135ec55.zip | |
Rollup merge of #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`
| -rw-r--r-- | src/libcore/future.rs | 14 | ||||
| -rw-r--r-- | src/libstd/error.rs | 1 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/libcore/future.rs b/src/libcore/future.rs index a8c8f69411e..153cd6c0724 100644 --- a/src/libcore/future.rs +++ b/src/libcore/future.rs @@ -45,18 +45,18 @@ pub trait Future { /// /// This function returns: /// - /// - `Poll::Pending` if the future is not ready yet - /// - `Poll::Ready(val)` with the result `val` of this future if it finished - /// successfully. + /// - [`Poll::Pending`] if the future is not ready yet + /// - [`Poll::Ready(val)`] with the result `val` of this future if it + /// finished successfully. /// /// Once a future has finished, clients should not `poll` it again. /// /// When a future is not ready yet, `poll` returns - /// [`Poll::Pending`](::task::Poll). The future will *also* register the + /// `Poll::Pending`. The future will *also* register the /// interest of the current task in the value being produced. For example, /// if the future represents the availability of data on a socket, then the /// task is recorded so that when data arrives, it is woken up (via - /// [`cx.waker()`](::task::Context::waker)). Once a task has been woken up, + /// [`cx.waker()`]). Once a task has been woken up, /// it should attempt to `poll` the future again, which may or may not /// produce a final value. /// @@ -90,6 +90,10 @@ pub trait Future { /// then any future calls to `poll` may panic, block forever, or otherwise /// cause bad behavior. The `Future` trait itself provides no guarantees /// about the behavior of `poll` after a future has completed. + /// + /// [`Poll::Pending`]: ../task/enum.Poll.html#variant.Pending + /// [`Poll::Ready(val)`]: ../task/enum.Poll.html#variant.Ready + /// [`cx.waker()`]: ../task/struct.Context.html#method.waker fn poll(self: PinMut<Self>, cx: &mut task::Context) -> Poll<Self::Output>; } diff --git a/src/libstd/error.rs b/src/libstd/error.rs index 3160485375f..1958915602f 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -49,6 +49,7 @@ use string; /// /// [`Result<T, E>`]: ../result/enum.Result.html /// [`Display`]: ../fmt/trait.Display.html +/// [`Debug`]: ../fmt/trait.Debug.html /// [`cause`]: trait.Error.html#method.cause #[stable(feature = "rust1", since = "1.0.0")] pub trait Error: Debug + Display { |
