We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d601d6 commit 39466bcCopy full SHA for 39466bc
library/std/src/error.rs
@@ -506,6 +506,27 @@ impl<T: Error> Error for Box<T> {
506
}
507
508
509
+#[stable(feature = "error_by_ref", since = "1.47.0")]
510
+impl<'a, T: Error + ?Sized> Error for &'a T {
511
+ #[allow(deprecated, deprecated_in_future)]
512
+ fn description(&self) -> &str {
513
+ Error::description(&**self)
514
+ }
515
+
516
+ #[allow(deprecated)]
517
+ fn cause(&self) -> Option<&dyn Error> {
518
+ Error::cause(&**self)
519
520
521
+ fn source(&self) -> Option<&(dyn Error + 'static)> {
522
+ Error::source(&**self)
523
524
525
+ fn backtrace(&self) -> Option<&Backtrace> {
526
+ Error::backtrace(&**self)
527
528
+}
529
530
#[stable(feature = "fmt_error", since = "1.11.0")]
531
impl Error for fmt::Error {
532
#[allow(deprecated)]
0 commit comments