Skip to content

Commit 24ed62c

Browse files
authored
Unrolled build for #131923
Rollup merge of #131923 - ranger-ross:impl-copy-hash-interrorkind, r=tgross35 Derive `Copy` and `Hash` for `IntErrorKind` This PR derives `Copy` and `Hash` for `IntErrorKind` to make it easier to work with. (see #131826) I think an argument could be made to also derive `PartialOrd` + `Ord` as well given that other error kinds in the std like [`io::ErrorKind`](https://doc.rust-lang.org/src/std/io/error.rs.html#212-428) do this. Granted these seem much less useful for errors. Fixes #131826
2 parents 6677875 + 739f4ac commit 24ed62c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/num/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ pub struct ParseIntError {
7979
/// # }
8080
/// ```
8181
#[stable(feature = "int_error_matching", since = "1.55.0")]
82-
#[derive(Debug, Clone, PartialEq, Eq)]
82+
#[derive(Debug, Clone, PartialEq, Eq, Copy, Hash)]
8383
#[non_exhaustive]
8484
pub enum IntErrorKind {
8585
/// Value being parsed is empty.

0 commit comments

Comments
 (0)