X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibstd%2Ferror.rs;h=660948b0accac4c38808906cacf071d4ca6c1b7d;hb=a70ae2ffb9a5dd08d916b9938eeca820486ba7a0;hp=c44a4bfe0f16157a6698ffbb5e8e14a89a49037a;hpb=f28a43102b078c5dee78ba5cbbcbb0350cd92330;p=rust.git diff --git a/src/libstd/error.rs b/src/libstd/error.rs index c44a4bfe0f1..660948b0acc 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -182,6 +182,24 @@ fn description(&self) -> &str { } } +#[stable(feature = "str_parse_error2", since = "1.8.0")] +impl Error for string::ParseError { + fn description(&self) -> &str { + match *self {} + } +} + +#[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`