Move error trait into core
This commit is contained in:
committed by
Jane Lusby
parent
e0dc8d7801
commit
bf7611d55e
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user