Skip to content

Commit

Permalink
impl Hash for !
Browse files Browse the repository at this point in the history
  • Loading branch information
Clar Charr committed Jun 15, 2018
1 parent 5205ae8 commit 570590f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/libcore/hash/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,13 @@ mod impls {
}
}

#[stable(feature = "never_hash", since = "1.29.0")]
impl Hash for ! {
fn hash<H: Hasher>(&self, _: &mut H) {
*self
}
}

macro_rules! impl_hash_tuple {
() => (
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down

0 comments on commit 570590f

Please sign in to comment.