about summary refs log tree commit diff
path: root/src/libcore/hash
diff options
context:
space:
mode:
authorClar Charr <clar@charr.xyz>2018-06-06 19:40:03 -0400
committerClar Charr <clar@charr.xyz>2018-06-14 23:26:38 -0400
commit570590f7271ddd1bcedf14a7bbc38975db720419 (patch)
treec84207f5459d2a0c3043f028363df4bbbada3938 /src/libcore/hash
parent5205ae8bdc2991eecf3bfbb58ed8f56c0673e738 (diff)
downloadrust-570590f7271ddd1bcedf14a7bbc38975db720419.tar.gz
rust-570590f7271ddd1bcedf14a7bbc38975db720419.zip
impl Hash for !
Diffstat (limited to 'src/libcore/hash')
-rw-r--r--src/libcore/hash/mod.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libcore/hash/mod.rs b/src/libcore/hash/mod.rs
index 3e1f21cafe4..e6f8dfffd63 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<H: Hasher>(&self, _: &mut H) {
+            *self
+        }
+    }
+
     macro_rules! impl_hash_tuple {
         () => (
             #[stable(feature = "rust1", since = "1.0.0")]