diff options
Diffstat (limited to 'src/libstd/io/error.rs')
| -rw-r--r-- | src/libstd/io/error.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libstd/io/error.rs b/src/libstd/io/error.rs index 3b55d9b9002..f7248e7547e 100644 --- a/src/libstd/io/error.rs +++ b/src/libstd/io/error.rs @@ -160,6 +160,11 @@ pub enum ErrorKind { #[stable(feature = "rust1", since = "1.0.0")] Interrupted, /// Any I/O error not part of this list. + /// + /// Errors that are `Other` now may move to a different or a new + /// [`ErrorKind`] variant in the future. It is not recommended to match + /// an error against `Other` and to expect any additional characteristics, + /// e.g., a specific [`Error::raw_os_error`] return value. #[stable(feature = "rust1", since = "1.0.0")] Other, @@ -487,9 +492,9 @@ impl Error { /// } /// /// fn main() { - /// // Will print "No inner error". + /// // Will print "Other". /// print_error(Error::last_os_error()); - /// // Will print "Inner error: ...". + /// // Will print "AddrInUse". /// print_error(Error::new(ErrorKind::AddrInUse, "oh no!")); /// } /// ``` |
