about summary refs log tree commit diff
path: root/library/core/src/array
diff options
context:
space:
mode:
authorJane Losare-Lusby <jlusby@yaah.dev>2022-07-29 18:54:47 +0000
committerJane Lusby <jlusby@yaah.dev>2022-08-22 13:28:25 -0700
commitbf7611d55ee6e24647aefc4d1c82b1dba0164536 (patch)
treeca210f013c939a839c776ca63dcbcbfebbc4f564 /library/core/src/array
parente0dc8d78019ca924203fe153ff0af7f64f68cb5d (diff)
downloadrust-bf7611d55ee6e24647aefc4d1c82b1dba0164536.tar.gz
rust-bf7611d55ee6e24647aefc4d1c82b1dba0164536.zip
Move error trait into core
Diffstat (limited to 'library/core/src/array')
-rw-r--r--library/core/src/array/mod.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs
index db5bfcab9d2..9effb379016 100644
--- a/library/core/src/array/mod.rs
+++ b/library/core/src/array/mod.rs
@@ -7,6 +7,8 @@
 use crate::borrow::{Borrow, BorrowMut};
 use crate::cmp::Ordering;
 use crate::convert::{Infallible, TryFrom};
+#[cfg(not(bootstrap))]
+use crate::error::Error;
 use crate::fmt;
 use crate::hash::{self, Hash};
 use crate::iter::TrustedLen;
@@ -119,6 +121,15 @@ impl fmt::Display for TryFromSliceError {
     }
 }
 
+#[cfg(not(bootstrap))]
+#[stable(feature = "try_from", since = "1.34.0")]
+impl Error for TryFromSliceError {
+    #[allow(deprecated)]
+    fn description(&self) -> &str {
+        self.__description()
+    }
+}
+
 impl TryFromSliceError {
     #[unstable(
         feature = "array_error_internals",