diff options
Diffstat (limited to 'src/libstd/error.rs')
| -rw-r--r-- | src/libstd/error.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libstd/error.rs b/src/libstd/error.rs index 6d64ea0d503..231b0be9276 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -56,6 +56,8 @@ use any::TypeId; use borrow::Cow; use cell; use char; +use convert; +use core::array; use fmt::{self, Debug, Display}; use mem::transmute; use num; @@ -281,6 +283,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 { @@ -362,6 +371,13 @@ impl Error for char::ParseCharError { } } +#[unstable(feature = "try_from", issue = "33417")] +impl Error for convert::Infallible { + fn description(&self) -> &str { + match *self { + } + } +} // copied from any.rs impl Error + 'static { |
