From 5ab14057f6e2a4f975443d7e553f7abbf927836d Mon Sep 17 00:00:00 2001 From: GuillaumeGomez Date: Sat, 24 Jan 2015 13:58:51 +0100 Subject: [PATCH] Add Hash trait to NonZero type --- src/libcore/nonzero.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcore/nonzero.rs b/src/libcore/nonzero.rs index abaf252932300..1231e1ab89436 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); @@ -52,4 +52,4 @@ impl Deref for NonZero { let NonZero(ref inner) = *self; inner } -} +} \ No newline at end of file