@@ -109,12 +109,13 @@ pub(super) mod os {
109109/// While usual Rust style is to import types directly, aliases of [`Result`]
110110/// often are not, to make it easier to distinguish between them. [`Result`] is
111111/// generally assumed to be [`std::result::Result`][`Result`], and so users of this alias
112- /// will generally use `io::Result` instead of shadowing the prelude's import
112+ /// will generally use `io::Result` instead of shadowing the [ prelude] 's import
113113/// of [`std::result::Result`][`Result`].
114114///
115115/// [`std::io`]: crate::io
116116/// [`io::Error`]: Error
117117/// [`Result`]: core::result::Result
118+ /// [prelude]: crate::prelude
118119///
119120/// # Examples
120121///
@@ -135,11 +136,16 @@ pub(super) mod os {
135136#[ doc( search_unbox) ]
136137pub type Result < T > = result:: Result < T , Error > ;
137138
138- /// The error type for I/O operations.
139+ /// The error type for I/O operations of the [`Read`], [`Write`], [`Seek`], and
140+ /// associated traits.
139141///
140142/// Errors mostly originate from the underlying OS, but custom instances of
141143/// `Error` can be created with crafted error messages and a particular value of
142144/// [`ErrorKind`].
145+ ///
146+ /// [`Read`]: crate::io::Read
147+ /// [`Write`]: crate::io::Write
148+ /// [`Seek`]: crate::io::Seek
143149#[ stable( feature = "rust1" , since = "1.0.0" ) ]
144150#[ rustc_has_incoherent_inherent_impls]
145151pub struct Error {
@@ -211,7 +217,7 @@ enum ErrorData<C> {
211217 Custom ( C ) ,
212218}
213219
214- /// The type of raw OS error codes.
220+ /// The type of raw OS error codes returned by [`Error::raw_os_error`] .
215221///
216222/// This is an [`i32`] on all currently supported platforms, but platforms
217223/// added in the future (such as UEFI) may use a different primitive type like
@@ -407,12 +413,13 @@ pub enum ErrorKind {
407413 TimedOut ,
408414 // FIXME: restore links to `write` when trait is moved to `alloc`
409415 /// An error returned when an operation could not be completed because a
410- /// call to `write` returned [`Ok(0)`].
416+ /// call to [ `write`] returned [`Ok(0)`].
411417 ///
412418 /// This typically means that an operation could only succeed if it wrote a
413419 /// particular number of bytes but only a smaller number of bytes could be
414420 /// written.
415421 ///
422+ /// [`write`]: crate::io::Write::write
416423 /// [`Ok(0)`]: Ok
417424 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
418425 WriteZero ,
0 commit comments