about summary refs log tree commit diff
path: root/src/libstd/io/error.rs
diff options
context:
space:
mode:
authorJonathan Turner <jonathandturner@users.noreply.github.com>2016-08-31 13:53:33 -0700
committerGitHub <noreply@github.com>2016-08-31 13:53:33 -0700
commit117cbb879e6ef498ea04e08bd80688bf2fc4a183 (patch)
treedb192c7d217627ce704a45b2e009f92be0a5fbdc /src/libstd/io/error.rs
parent4bc5bcd812d16ff87282f616c6ce3432c0c9dac9 (diff)
parentc2d064efa1e31ffc0a6bfcc6847bf386a44c1f9e (diff)
downloadrust-117cbb879e6ef498ea04e08bd80688bf2fc4a183.tar.gz
rust-117cbb879e6ef498ea04e08bd80688bf2fc4a183.zip
Rollup merge of #35911 - tbu-:pr_io_errorkind_traits, r=alexcrichton
Implement more traits for `std::io::ErrorKind`

This makes it possible to use it as key in various maps.
Diffstat (limited to 'src/libstd/io/error.rs')
-rw-r--r--src/libstd/io/error.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstd/io/error.rs b/src/libstd/io/error.rs
index d90be2e08a9..ddf0030858e 100644
--- a/src/libstd/io/error.rs
+++ b/src/libstd/io/error.rs
@@ -79,7 +79,7 @@ struct Custom {
 /// It is used with the [`io::Error`] type.
 ///
 /// [`io::Error`]: struct.Error.html
-#[derive(Copy, PartialEq, Eq, Clone, Debug)]
+#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
 #[stable(feature = "rust1", since = "1.0.0")]
 #[allow(deprecated)]
 pub enum ErrorKind {
@@ -161,7 +161,8 @@ pub enum ErrorKind {
     #[stable(feature = "read_exact", since = "1.6.0")]
     UnexpectedEof,
 
-    /// Any I/O error not part of this list.
+    /// A marker variant that tells the compiler that users of this enum cannot
+    /// match it exhaustively.
     #[unstable(feature = "io_error_internals",
                reason = "better expressed through extensible enums that this \
                          enum cannot be exhaustively matched against",