diff options
| author | Matthew Kelly <matthew.kelly2@gmail.com> | 2022-08-31 19:39:39 -0400 |
|---|---|---|
| committer | Matthew Kelly <matthew.kelly2@gmail.com> | 2022-08-31 19:39:39 -0400 |
| commit | eda2a401457ba645a32bdc5b9e7e90214e3e4e24 (patch) | |
| tree | 76c4a12cb26666f03aa37a81abe27782def16f1d /library/core/src/array | |
| parent | 4a443dfb8227d407ff3f0542cb6e688833708ba9 (diff) | |
| parent | 9243168fa5615ec8ebe9164c6bc2fdcccffd08b6 (diff) | |
| download | rust-eda2a401457ba645a32bdc5b9e7e90214e3e4e24.tar.gz rust-eda2a401457ba645a32bdc5b9e7e90214e3e4e24.zip | |
Merge remote-tracking branch 'origin/master' into mpk/add-long-error-message-for-E0311
Diffstat (limited to 'library/core/src/array')
| -rw-r--r-- | library/core/src/array/mod.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs index c9823a136bc..9effb379016 100644 --- a/library/core/src/array/mod.rs +++ b/library/core/src/array/mod.rs @@ -1,4 +1,4 @@ -//! Helper functions and types for fixed-length arrays. +//! Utilities for the array primitive type. //! //! *[See also the array primitive type](array).* @@ -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", |
