@@ -565,12 +565,6 @@ impl Error {
565
565
/// other standard library functions may call platform functions that may
566
566
/// (or may not) reset the error value even if they succeed.
567
567
///
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
- ///
574
568
/// # Examples
575
569
///
576
570
/// ```
@@ -877,9 +871,9 @@ impl Error {
877
871
878
872
/// Returns the corresponding [`ErrorKind`] for this error.
879
873
///
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 .
883
877
/// See [`last_os_error`] for more details.
884
878
///
885
879
/// [`last_os_error`]: Error::last_os_error
@@ -894,7 +888,7 @@ impl Error {
894
888
/// }
895
889
///
896
890
/// fn main() {
897
- /// // As no error has occurred, this may print anything!
891
+ /// // As no error has (visibly) occurred, this may print anything!
898
892
/// // It likely prints a placeholder for unidentified (non-)errors.
899
893
/// print_error(Error::last_os_error());
900
894
/// // Will print "AddrInUse".
0 commit comments