From 570590f7271ddd1bcedf14a7bbc38975db720419 Mon Sep 17 00:00:00 2001 From: Clar Charr Date: Wed, 6 Jun 2018 19:40:03 -0400 Subject: [PATCH] impl Hash for ! --- src/libcore/hash/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libcore/hash/mod.rs b/src/libcore/hash/mod.rs index 3e1f21cafe412..e6f8dfffd6330 100644 --- a/src/libcore/hash/mod.rs +++ b/src/libcore/hash/mod.rs @@ -603,6 +603,13 @@ mod impls { } } + #[stable(feature = "never_hash", since = "1.29.0")] + impl Hash for ! { + fn hash(&self, _: &mut H) { + *self + } + } + macro_rules! impl_hash_tuple { () => ( #[stable(feature = "rust1", since = "1.0.0")]