Implement Error trait for TryFromSliceError

This commit is contained in:
Nikolai Vazquez 2017-09-29 11:15:05 -04:00
parent a6e70b5fb4
commit e45e8abec2
2 changed files with 23 additions and 0 deletions

View file

@ -56,6 +56,7 @@ use any::TypeId;
use borrow::Cow;
use cell;
use char;
use core::array;
use fmt::{self, Debug, Display};
use mem::transmute;
use num;
@ -281,6 +282,13 @@ impl Error for num::TryFromIntError {
}
}
#[unstable(feature = "try_from", issue = "33417")]
impl Error for array::TryFromSliceError {
fn description(&self) -> &str {
self.__description()
}
}
#[stable(feature = "rust1", since = "1.0.0")]
impl Error for num::ParseFloatError {
fn description(&self) -> &str {