Rollup merge of #47272 - GuillaumeGomez:missing-links, r=QuietMisdreavus

Add missing links

r? @QuietMisdreavus

(please wait for CI, I have a few doubts about the `Write` trait links...)
This commit is contained in:
kennytm 2018-01-09 01:58:55 +08:00
commit 9ef98545c9
No known key found for this signature in database
GPG Key ID: FEF6C8051D0E013C
2 changed files with 18 additions and 8 deletions

View File

@ -83,9 +83,12 @@ pub type Result = result::Result<(), Error>;
/// some other means.
///
/// An important thing to remember is that the type `fmt::Error` should not be
/// confused with `std::io::Error` or `std::error::Error`, which you may also
/// confused with [`std::io::Error`] or [`std::error::Error`], which you may also
/// have in scope.
///
/// [`std::io::Error`]: ../../std/io/struct.Error.html
/// [`std::error::Error`]: ../../std/error/trait.Error.html
///
/// # Examples
///
/// ```rust

View File

@ -997,9 +997,9 @@ pub trait Write {
///
/// Calls to `write` are not guaranteed to block waiting for data to be
/// written, and a write which would otherwise block can be indicated through
/// an `Err` variant.
/// an [`Err`] variant.
///
/// If the return value is `Ok(n)` then it must be guaranteed that
/// If the return value is [`Ok(n)`] then it must be guaranteed that
/// `0 <= n <= buf.len()`. A return value of `0` typically means that the
/// underlying object is no longer able to accept bytes and will likely not
/// be able to in the future as well, or that the buffer provided is empty.
@ -1013,9 +1013,13 @@ pub trait Write {
/// It is **not** considered an error if the entire buffer could not be
/// written to this writer.
///
/// An error of the `ErrorKind::Interrupted` kind is non-fatal and the
/// An error of the [`ErrorKind::Interrupted`] kind is non-fatal and the
/// write operation should be retried if there is nothing else to do.
///
/// [`Err`]: ../../std/result/enum.Result.html#variant.Err
/// [`Ok(n)`]: ../../std/result/enum.Result.html#variant.Ok
/// [`ErrorKind::Interrupted`]: ../../std/io/enum.ErrorKind.html#variant.Interrupted
///
/// # Examples
///
/// ```
@ -1061,17 +1065,20 @@ pub trait Write {
/// Attempts to write an entire buffer into this write.
///
/// This method will continuously call `write` until there is no more data
/// to be written or an error of non-`ErrorKind::Interrupted` kind is
/// This method will continuously call [`write`] until there is no more data
/// to be written or an error of non-[`ErrorKind::Interrupted`] kind is
/// returned. This method will not return until the entire buffer has been
/// successfully written or such an error occurs. The first error that is
/// not of `ErrorKind::Interrupted` kind generated from this method will be
/// not of [`ErrorKind::Interrupted`] kind generated from this method will be
/// returned.
///
/// # Errors
///
/// This function will return the first error of
/// non-`ErrorKind::Interrupted` kind that `write` returns.
/// non-[`ErrorKind::Interrupted`] kind that [`write`] returns.
///
/// [`ErrorKind::Interrupted`]: ../../std/io/enum.ErrorKind.html#variant.Interrupted
/// [`write`]: #tymethod.write
///
/// # Examples
///