]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/error.rs
CStr::from_bytes
[rust.git] / src / libstd / error.rs
index c44a4bfe0f16157a6698ffbb5e8e14a89a49037a..660948b0accac4c38808906cacf071d4ca6c1b7d 100644 (file)
@@ -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<T: Error> Error for Box<T> {
+    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`