Move error trait into core

This commit is contained in:
Jane Losare-Lusby
2022-07-29 18:54:47 +00:00
committed by Jane Lusby
parent e0dc8d7801
commit bf7611d55e
25 changed files with 1264 additions and 226 deletions

View File

@@ -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",