@@ -565,12 +565,6 @@ impl Error {
565565 /// other standard library functions may call platform functions that may
566566 /// (or may not) reset the error value even if they succeed.
567567 ///
568- /// If this is used in a case where no error has yet occurred in a program,
569- /// e.g. right after the beginning of `fn main`,
570- /// then in principle any possible Error may be returned.
571- /// The error code may have been set by a previous program (e.g. `execve`)
572- /// or the OS may have initialized it to an arbitrary, even random, value.
573- ///
574568 /// # Examples
575569 ///
576570 /// ```
@@ -877,9 +871,9 @@ impl Error {
877871
878872 /// Returns the corresponding [`ErrorKind`] for this error.
879873 ///
880- /// In some cases, the ErrorKind variant may not make much sense ,
881- /// either because the situation does not actually involve an error, or
882- /// because of a new error code the standard library has not been taught .
874+ /// This may be a value set by Rust code constructing custom `io::Error`s ,
875+ /// or if this `io::Error` was sourced from the operating system,
876+ /// it will be a value inferred from the system's error encoding .
883877 /// See [`last_os_error`] for more details.
884878 ///
885879 /// [`last_os_error`]: Error::last_os_error
@@ -894,7 +888,7 @@ impl Error {
894888 /// }
895889 ///
896890 /// fn main() {
897- /// // As no error has occurred, this may print anything!
891+ /// // As no error has (visibly) occurred, this may print anything!
898892 /// // It likely prints a placeholder for unidentified (non-)errors.
899893 /// print_error(Error::last_os_error());
900894 /// // Will print "AddrInUse".
0 commit comments