diff --git a/src/runtime/current_thread/runtime.rs b/src/runtime/current_thread/runtime.rs index 262cb1e72d8..6bb2b076768 100644 --- a/src/runtime/current_thread/runtime.rs +++ b/src/runtime/current_thread/runtime.rs @@ -92,6 +92,10 @@ impl Error for RunError { fn description(&self) -> &str { self.inner.description() } + + // FIXME(taiki-e): When the minimum support version of tokio reaches Rust 1.30, + // replace this with Error::source. + #[allow(deprecated)] fn cause(&self) -> Option<&Error> { self.inner.cause() } diff --git a/tokio-timer/src/throttle.rs b/tokio-timer/src/throttle.rs index c1da76bbf89..12e8895764a 100644 --- a/tokio-timer/src/throttle.rs +++ b/tokio-timer/src/throttle.rs @@ -161,6 +161,9 @@ impl StdError for ThrottleError { } } + // FIXME(taiki-e): When the minimum support version of tokio reaches Rust 1.30, + // replace this with Error::source. + #[allow(deprecated)] fn cause(&self) -> Option<&StdError> { match self.0 { Either::A(ref err) => Some(err),