X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibstd%2Ferror.rs;h=660948b0accac4c38808906cacf071d4ca6c1b7d;hb=a70ae2ffb9a5dd08d916b9938eeca820486ba7a0;hp=ee367193e456b165ec8c70142023c83f7f02b643;hpb=b2f4c5c596524ceb7b7dcbf6e87105c81a2fa7ac;p=rust.git 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 @@ fn description(&self) -> &str { } } +#[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`