about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/error.rs22
-rw-r--r--library/std/src/lib.rs1
-rw-r--r--library/std/src/macros.rs2
-rw-r--r--library/std/src/os/raw/mod.rs2
4 files changed, 24 insertions, 3 deletions
diff --git a/library/std/src/error.rs b/library/std/src/error.rs
index 605d953f5da..94338c7b04d 100644
--- a/library/std/src/error.rs
+++ b/library/std/src/error.rs
@@ -30,6 +30,7 @@ use crate::mem::transmute;
 use crate::num;
 use crate::str;
 use crate::string;
+use crate::sync::Arc;
 
 /// `Error` is a trait representing the basic expectations for error values,
 /// i.e., values of type `E` in [`Result<T, E>`]. Errors must describe
@@ -507,6 +508,27 @@ impl<'a, T: Error + ?Sized> Error for &'a T {
     }
 }
 
+#[stable(feature = "arc_error", since = "1.52.0")]
+impl<T: Error + ?Sized> Error for Arc<T> {
+    #[allow(deprecated, deprecated_in_future)]
+    fn description(&self) -> &str {
+        Error::description(&**self)
+    }
+
+    #[allow(deprecated)]
+    fn cause(&self) -> Option<&dyn Error> {
+        Error::cause(&**self)
+    }
+
+    fn source(&self) -> Option<&(dyn Error + 'static)> {
+        Error::source(&**self)
+    }
+
+    fn backtrace(&self) -> Option<&Backtrace> {
+        Error::backtrace(&**self)
+    }
+}
+
 #[stable(feature = "fmt_error", since = "1.11.0")]
 impl Error for fmt::Error {
     #[allow(deprecated)]
diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs
index 588bffb57c9..32aca8c8392 100644
--- a/library/std/src/lib.rs
+++ b/library/std/src/lib.rs
@@ -264,7 +264,6 @@
 #![feature(exhaustive_patterns)]
 #![feature(extend_one)]
 #![feature(extended_key_value_attributes)]
-#![feature(external_doc)]
 #![feature(fn_traits)]
 #![feature(format_args_nl)]
 #![feature(gen_future)]
diff --git a/library/std/src/macros.rs b/library/std/src/macros.rs
index c0750f8c0d1..b729349cf53 100644
--- a/library/std/src/macros.rs
+++ b/library/std/src/macros.rs
@@ -4,7 +4,7 @@
 //! library. Each macro is available for use when linking against the standard
 //! library.
 
-#[doc(include = "../../core/src/macros/panic.md")]
+#[doc = include_str!("../../core/src/macros/panic.md")]
 #[macro_export]
 #[rustc_builtin_macro = "std_panic"]
 #[stable(feature = "rust1", since = "1.0.0")]
diff --git a/library/std/src/os/raw/mod.rs b/library/std/src/os/raw/mod.rs
index 22c98d7ade9..50464a050c7 100644
--- a/library/std/src/os/raw/mod.rs
+++ b/library/std/src/os/raw/mod.rs
@@ -18,7 +18,7 @@ macro_rules! type_alias_no_nz {
       $Docfile:tt, $Alias:ident = $Real:ty;
       $( $Cfg:tt )*
     } => {
-        #[doc(include = $Docfile)]
+        #[doc = include_str!($Docfile)]
         $( $Cfg )*
         #[stable(feature = "raw_os", since = "1.1.0")]
         pub type $Alias = $Real;