about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libcore/convert/mod.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libcore/convert/mod.rs b/src/libcore/convert/mod.rs
index 47ab8715cfa..eef9ee7cb00 100644
--- a/src/libcore/convert/mod.rs
+++ b/src/libcore/convert/mod.rs
@@ -41,6 +41,7 @@
 #![stable(feature = "rust1", since = "1.0.0")]
 
 use crate::fmt;
+use crate::hash::{Hash, Hasher};
 
 mod num;
 
@@ -746,3 +747,10 @@ impl From<!> for Infallible {
         x
     }
 }
+
+#[stable(feature = "convert_infallible_hash", since = "1.44.0")]
+impl Hash for Infallible {
+    fn hash<H: Hasher>(&self, _: &mut H) {
+        match *self {}
+    }
+}