Skip to content

Commit 8951cb5

Browse files
s3bkSebastian Köln
authored and
Sebastian Köln
committed
implement Error::source for Box<T: Error>
fixes #61899
1 parent e3175c3 commit 8951cb5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libstd/error.rs

+4
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,10 @@ impl<T: Error> Error for Box<T> {
560560
fn cause(&self) -> Option<&dyn Error> {
561561
Error::cause(&**self)
562562
}
563+
564+
fn source(&self) -> Option<&(dyn Error + 'static)> {
565+
Error::source(&**self)
566+
}
563567
}
564568

565569
#[stable(feature = "fmt_error", since = "1.11.0")]

0 commit comments

Comments
 (0)