Move error trait into core
This commit is contained in:
committed by
Jane Lusby
parent
e0dc8d7801
commit
bf7611d55e
@@ -1,6 +1,8 @@
|
||||
//! Error types for conversion to integral types.
|
||||
|
||||
use crate::convert::Infallible;
|
||||
#[cfg(not(bootstrap))]
|
||||
use crate::error::Error;
|
||||
use crate::fmt;
|
||||
|
||||
/// The error type returned when a checked integral type conversion fails.
|
||||
@@ -144,3 +146,21 @@ impl fmt::Display for ParseIntError {
|
||||
self.__description().fmt(f)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(bootstrap))]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl Error for ParseIntError {
|
||||
#[allow(deprecated)]
|
||||
fn description(&self) -> &str {
|
||||
self.__description()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(bootstrap))]
|
||||
#[stable(feature = "try_from", since = "1.34.0")]
|
||||
impl Error for TryFromIntError {
|
||||
#[allow(deprecated)]
|
||||
fn description(&self) -> &str {
|
||||
self.__description()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user