about summary refs log tree commit diff
path: root/src/libstd/io/error.rs
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2018-08-15 16:57:06 +0100
committervarkor <github@varkor.com>2018-08-15 17:16:48 +0100
commitea505fd60b09bbfb127c874a27abac52d44bfe00 (patch)
tree32ae558a7a7830280632690918d4229b62662a9a /src/libstd/io/error.rs
parenta50224804d7bd8c492ecd83c4f2d81d33145ba88 (diff)
downloadrust-ea505fd60b09bbfb127c874a27abac52d44bfe00.tar.gz
rust-ea505fd60b09bbfb127c874a27abac52d44bfe00.zip
Make std::io::Error #[non_exhaustive]
Diffstat (limited to 'src/libstd/io/error.rs')
-rw-r--r--src/libstd/io/error.rs11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/libstd/io/error.rs b/src/libstd/io/error.rs
index 02a3ce8b9c4..3e50988a68b 100644
--- a/src/libstd/io/error.rs
+++ b/src/libstd/io/error.rs
@@ -97,6 +97,7 @@ struct Custom {
 #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
 #[stable(feature = "rust1", since = "1.0.0")]
 #[allow(deprecated)]
+#[non_exhaustive]
 pub enum ErrorKind {
     /// An entity was not found, often a file.
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -180,15 +181,6 @@ pub enum ErrorKind {
     /// read.
     #[stable(feature = "read_exact", since = "1.6.0")]
     UnexpectedEof,
-
-    /// 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",
-               issue = "0")]
-    #[doc(hidden)]
-    __Nonexhaustive,
 }
 
 impl ErrorKind {
@@ -212,7 +204,6 @@ impl ErrorKind {
             ErrorKind::Interrupted => "operation interrupted",
             ErrorKind::Other => "other os error",
             ErrorKind::UnexpectedEof => "unexpected end of file",
-            ErrorKind::__Nonexhaustive => unreachable!()
         }
     }
 }