Skip to content

Commit 570590f

Browse files
author
Clar Charr
committed
impl Hash for !
1 parent 5205ae8 commit 570590f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/libcore/hash/mod.rs

+7
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,13 @@ mod impls {
603603
}
604604
}
605605

606+
#[stable(feature = "never_hash", since = "1.29.0")]
607+
impl Hash for ! {
608+
fn hash<H: Hasher>(&self, _: &mut H) {
609+
*self
610+
}
611+
}
612+
606613
macro_rules! impl_hash_tuple {
607614
() => (
608615
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)