diff --git a/src/libstd/error.rs b/src/libstd/error.rs index ee367193e45..660948b0acc 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -189,6 +189,17 @@ impl Error for string::ParseError { } } +#[stable(feature = "box_error", since = "1.7.0")] +impl Error for Box { + fn description(&self) -> &str { + Error::description(&**self) + } + + fn cause(&self) -> Option<&Error> { + Error::cause(&**self) + } +} + // copied from any.rs impl Error + 'static { /// Returns true if the boxed type is the same as `T`