diff options
| author | GuillaumeGomez <guillaume1.gomez@gmail.com> | 2015-01-24 13:58:51 +0100 |
|---|---|---|
| committer | GuillaumeGomez <guillaume1.gomez@gmail.com> | 2015-01-24 13:58:51 +0100 |
| commit | 5ab14057f6e2a4f975443d7e553f7abbf927836d (patch) | |
| tree | d1963ca88f5ae62fc67dff2b469f15197ebcf107 | |
| parent | 4be79d6acde9eed3a9b5281a46f385bcb4ce736c (diff) | |
| download | rust-5ab14057f6e2a4f975443d7e553f7abbf927836d.tar.gz rust-5ab14057f6e2a4f975443d7e553f7abbf927836d.zip | |
Add Hash trait to NonZero type
| -rw-r--r-- | src/libcore/nonzero.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/nonzero.rs b/src/libcore/nonzero.rs index abaf2529323..1231e1ab894 100644 --- a/src/libcore/nonzero.rs +++ b/src/libcore/nonzero.rs @@ -31,7 +31,7 @@ unsafe impl Zeroable for u64 {} /// A wrapper type for raw pointers and integers that will never be /// NULL or 0 that might allow certain optimizations. #[lang="non_zero"] -#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Show)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Show, Hash)] #[unstable] pub struct NonZero<T: Zeroable>(T); @@ -52,4 +52,4 @@ impl<T: Zeroable> Deref for NonZero<T> { let NonZero(ref inner) = *self; inner } -} +} \ No newline at end of file |
