Add Hash trait to NonZero type

This commit is contained in:
GuillaumeGomez 2015-01-24 13:58:51 +01:00
parent 4be79d6acd
commit 5ab14057f6

View File

@ -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
}
}
}