Skip to content
Myr

Remove as_dyn_error methods from Error

Before adoption: this commit came in with the history the project adopted, so no landing records it.

The underlying `dyn StdError + Send + Sync + 'static` is still available through Deref and DerefMut.

authored by David Tolnay · committed by David Tolnay · parent 508f881 · Browse files · 1 file+1 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−10 removed

  • other:+1 added−10 removed

1 file+1 added−10 removed

modified:src/error.rs+1 added-10 removed
81 unmodified lines
82 context,83 })84 }8586 /// View this error object as the underlying error.87 pub fn as_dyn_error(&self) -> &(dyn StdError + Send + Sync + 'static) {88 self.inner.error()89 }9091 /// View this error object as the underlying error, mutably.92 pub fn as_dyn_error_mut(&mut self) -> &mut (dyn StdError + Send + Sync + 'static) {93 self.inner.error_mut()94 }9586 /// Get the backtrace for this Error.87 ///88 /// Backtraces are only available on the nightly channel. Tracking issue:89 /// [rust-lang/rust#53487][tracking].
82 unmodified lines
172}173174impl Deref for Error {175 type Target = dyn StdError + Send + Sync + 'static;176177 fn deref(&self) -> &Self::Target {178 self.inner.error()179 }180}
184 unmodified lines