Skip to content

Commit 9ef9854

Browse files
committed
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...)
2 parents 9dd7cae + 9396973 commit 9ef9854

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

src/libcore/fmt/mod.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,12 @@ pub type Result = result::Result<(), Error>;
8383
/// some other means.
8484
///
8585
/// An important thing to remember is that the type `fmt::Error` should not be
86-
/// confused with `std::io::Error` or `std::error::Error`, which you may also
86+
/// confused with [`std::io::Error`] or [`std::error::Error`], which you may also
8787
/// have in scope.
8888
///
89+
/// [`std::io::Error`]: ../../std/io/struct.Error.html
90+
/// [`std::error::Error`]: ../../std/error/trait.Error.html
91+
///
8992
/// # Examples
9093
///
9194
/// ```rust

src/libstd/io/mod.rs

+14-7
Original file line numberDiff line numberDiff line change
@@ -997,9 +997,9 @@ pub trait Write {
997997
///
998998
/// Calls to `write` are not guaranteed to block waiting for data to be
999999
/// written, and a write which would otherwise block can be indicated through
1000-
/// an `Err` variant.
1000+
/// an [`Err`] variant.
10011001
///
1002-
/// If the return value is `Ok(n)` then it must be guaranteed that
1002+
/// If the return value is [`Ok(n)`] then it must be guaranteed that
10031003
/// `0 <= n <= buf.len()`. A return value of `0` typically means that the
10041004
/// underlying object is no longer able to accept bytes and will likely not
10051005
/// be able to in the future as well, or that the buffer provided is empty.
@@ -1013,9 +1013,13 @@ pub trait Write {
10131013
/// It is **not** considered an error if the entire buffer could not be
10141014
/// written to this writer.
10151015
///
1016-
/// An error of the `ErrorKind::Interrupted` kind is non-fatal and the
1016+
/// An error of the [`ErrorKind::Interrupted`] kind is non-fatal and the
10171017
/// write operation should be retried if there is nothing else to do.
10181018
///
1019+
/// [`Err`]: ../../std/result/enum.Result.html#variant.Err
1020+
/// [`Ok(n)`]: ../../std/result/enum.Result.html#variant.Ok
1021+
/// [`ErrorKind::Interrupted`]: ../../std/io/enum.ErrorKind.html#variant.Interrupted
1022+
///
10191023
/// # Examples
10201024
///
10211025
/// ```
@@ -1061,17 +1065,20 @@ pub trait Write {
10611065

10621066
/// Attempts to write an entire buffer into this write.
10631067
///
1064-
/// This method will continuously call `write` until there is no more data
1065-
/// to be written or an error of non-`ErrorKind::Interrupted` kind is
1068+
/// This method will continuously call [`write`] until there is no more data
1069+
/// to be written or an error of non-[`ErrorKind::Interrupted`] kind is
10661070
/// returned. This method will not return until the entire buffer has been
10671071
/// successfully written or such an error occurs. The first error that is
1068-
/// not of `ErrorKind::Interrupted` kind generated from this method will be
1072+
/// not of [`ErrorKind::Interrupted`] kind generated from this method will be
10691073
/// returned.
10701074
///
10711075
/// # Errors
10721076
///
10731077
/// This function will return the first error of
1074-
/// non-`ErrorKind::Interrupted` kind that `write` returns.
1078+
/// non-[`ErrorKind::Interrupted`] kind that [`write`] returns.
1079+
///
1080+
/// [`ErrorKind::Interrupted`]: ../../std/io/enum.ErrorKind.html#variant.Interrupted
1081+
/// [`write`]: #tymethod.write
10751082
///
10761083
/// # Examples
10771084
///

0 commit comments

Comments
 (0)