Skip to content

Commit 27b5f02

Browse files
committed
Make documentation for std::io::ErrorKind core::io compatible
Certain links will not be valid when moved into `core::io`
1 parent 48cc71e commit 27b5f02

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

library/std/src/io/error.rs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,6 @@ struct Custom {
211211
/// This list is intended to grow over time and it is not recommended to
212212
/// exhaustively match against it.
213213
///
214-
/// It is used with the [`io::Error`] type.
215-
///
216-
/// [`io::Error`]: Error
217-
///
218214
/// # Handling errors and matching on `ErrorKind`
219215
///
220216
/// In application code, use `match` for the `ErrorKind` values you are
@@ -329,13 +325,12 @@ pub enum ErrorKind {
329325
#[stable(feature = "rust1", since = "1.0.0")]
330326
TimedOut,
331327
/// An error returned when an operation could not be completed because a
332-
/// call to [`write`] returned [`Ok(0)`].
328+
/// call to an underlying writer returned [`Ok(0)`].
333329
///
334330
/// This typically means that an operation could only succeed if it wrote a
335331
/// particular number of bytes but only a smaller number of bytes could be
336332
/// written.
337333
///
338-
/// [`write`]: crate::io::Write::write
339334
/// [`Ok(0)`]: Ok
340335
#[stable(feature = "rust1", since = "1.0.0")]
341336
WriteZero,
@@ -434,7 +429,7 @@ pub enum ErrorKind {
434429
//
435430
/// A custom error that does not fall under any other I/O error kind.
436431
///
437-
/// This can be used to construct your own [`Error`]s that do not match any
432+
/// This can be used to construct your own errors that do not match any
438433
/// [`ErrorKind`].
439434
///
440435
/// This [`ErrorKind`] is not used by the standard library.
@@ -510,14 +505,6 @@ impl ErrorKind {
510505
#[stable(feature = "io_errorkind_display", since = "1.60.0")]
511506
impl fmt::Display for ErrorKind {
512507
/// Shows a human-readable description of the `ErrorKind`.
513-
///
514-
/// This is similar to `impl Display for Error`, but doesn't require first converting to Error.
515-
///
516-
/// # Examples
517-
/// ```
518-
/// use std::io::ErrorKind;
519-
/// assert_eq!("entity not found", ErrorKind::NotFound.to_string());
520-
/// ```
521508
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
522509
fmt.write_str(self.as_str())
523510
}

0 commit comments

Comments
 (0)