allow_deprecated on stub Error::description for rust 1.13
This commit is contained in:
parent
a42c5b22cd
commit
977ad60391
|
@ -333,7 +333,12 @@ impl fmt::Display for ParseError {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "std", test))]
|
#[cfg(any(feature = "std", test))]
|
||||||
impl Error for ParseError {}
|
impl Error for ParseError {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn description(&self) -> &str {
|
||||||
|
"parser error, see to_string() for details"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// to be used in this module and submodules
|
// to be used in this module and submodules
|
||||||
const OUT_OF_RANGE: ParseError = ParseError(ParseErrorKind::OutOfRange);
|
const OUT_OF_RANGE: ParseError = ParseError(ParseErrorKind::OutOfRange);
|
||||||
|
|
|
@ -400,7 +400,12 @@ impl fmt::Display for OutOfRangeError {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "std", test))]
|
#[cfg(any(feature = "std", test))]
|
||||||
impl Error for OutOfRangeError {}
|
impl Error for OutOfRangeError {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn description(&self) -> &str {
|
||||||
|
"out of range error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Copied from libnum
|
// Copied from libnum
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
Loading…
Reference in New Issue