diff options
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/error.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/io/error.rs b/src/libstd/io/error.rs index 97c5a29d308..70e6d7eb265 100644 --- a/src/libstd/io/error.rs +++ b/src/libstd/io/error.rs @@ -215,6 +215,13 @@ impl error::Error for Error { Repr::Custom(ref c) => c.error.description(), } } + + fn cause(&self) -> Option<&Error> { + match self.repr { + Repr::Os(..) => None, + Repr::Custom(ref c) => c.error.cause(), + } + } } fn _assert_error_is_sync_send() { |
