about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authors3bk <48330868+s3bk@users.noreply.github.com>2019-06-16 22:59:12 +0300
committerSebastian Köln <sebk@rynx.org>2019-06-17 11:24:09 +0300
commit8951cb5c40e4f577511ce7a10eca59f779c88933 (patch)
tree2173f3ad00a0dff66669988e3289a9fd3d92ee80 /src/libstd
parente3175c34b4211d219f114d6dc608194ebaf03c44 (diff)
downloadrust-8951cb5c40e4f577511ce7a10eca59f779c88933.tar.gz
rust-8951cb5c40e4f577511ce7a10eca59f779c88933.zip
implement Error::source for Box<T: Error>
fixes https://github.com/rust-lang/rust/issues/61899
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/error.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/error.rs b/src/libstd/error.rs
index 5cc7dcdae1f..5b1e78a1139 100644
--- a/src/libstd/error.rs
+++ b/src/libstd/error.rs
@@ -560,6 +560,10 @@ impl<T: Error> Error for Box<T> {
     fn cause(&self) -> Option<&dyn Error> {
         Error::cause(&**self)
     }
+
+    fn source(&self) -> Option<&(dyn Error + 'static)> {
+        Error::source(&**self)
+    }
 }
 
 #[stable(feature = "fmt_error", since = "1.11.0")]