Skip to content

Commit

Permalink
Rollup merge of rust-lang#47272 - GuillaumeGomez:missing-links, r=Qui…
Browse files Browse the repository at this point in the history
…etMisdreavus

Add missing links

r? @QuietMisdreavus

(please wait for CI, I have a few doubts about the `Write` trait links...)
  • Loading branch information
kennytm committed Jan 8, 2018
2 parents 9dd7cae + 9396973 commit 9ef9854
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
5 changes: 4 additions & 1 deletion src/libcore/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 14 additions & 7 deletions src/libstd/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
///
/// ```
Expand Down Expand Up @@ -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
///
Expand Down

0 comments on commit 9ef9854

Please sign in to comment.