diff options
| author | varkor <github@varkor.com> | 2018-08-15 16:57:06 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2018-08-15 17:16:48 +0100 |
| commit | ea505fd60b09bbfb127c874a27abac52d44bfe00 (patch) | |
| tree | 32ae558a7a7830280632690918d4229b62662a9a /src/libstd/io/error.rs | |
| parent | a50224804d7bd8c492ecd83c4f2d81d33145ba88 (diff) | |
| download | rust-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.rs | 11 |
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!() } } } |
