Skip to content

Commit

Permalink
Rollup merge of rust-lang#35911 - tbu-:pr_io_errorkind_traits, r=alex…
Browse files Browse the repository at this point in the history
…crichton

Implement more traits for `std::io::ErrorKind`

This makes it possible to use it as key in various maps.
  • Loading branch information
Jonathan Turner authored Aug 31, 2016
2 parents 4bc5bcd + c2d064e commit 117cbb8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libstd/io/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 117cbb8

Please sign in to comment.