Navigation Menu

Skip to content

Commit

Permalink
Add Hash trait to NonZero type
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jan 24, 2015
1 parent 4be79d6 commit 5ab1405
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/nonzero.rs
Expand Up @@ -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);

Expand All @@ -52,4 +52,4 @@ impl<T: Zeroable> Deref for NonZero<T> {
let NonZero(ref inner) = *self;
inner
}
}
}

0 comments on commit 5ab1405

Please sign in to comment.