]> git.lizzy.rs Git - rust.git/blobdiff - library/core/src/convert/mod.rs
Auto merge of #100733 - scottmcm:inline-from-from-identity, r=m-ou-se
[rust.git] / library / core / src / convert / mod.rs
index ff10a243d907aff9e009eeb1101951d94e032693..05637c166228f31e9fc980f7bc4d8c8a065794fb 100644 (file)
@@ -34,6 +34,8 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
+#[cfg(not(bootstrap))]
+use crate::error::Error;
 use crate::fmt;
 use crate::hash::{Hash, Hasher};
 
@@ -716,6 +718,14 @@ fn fmt(&self, _: &mut fmt::Formatter<'_>) -> fmt::Result {
     }
 }
 
+#[cfg(not(bootstrap))]
+#[stable(feature = "str_parse_error2", since = "1.8.0")]
+impl Error for Infallible {
+    fn description(&self) -> &str {
+        match *self {}
+    }
+}
+
 #[stable(feature = "convert_infallible", since = "1.34.0")]
 impl PartialEq for Infallible {
     fn eq(&self, _: &Infallible) -> bool {