about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_driver/args.rs7
-rw-r--r--src/librustc_error_codes/error_codes/E0638.md30
-rw-r--r--src/librustc_errors/lib.rs6
-rw-r--r--src/librustc_lint/array_into_iter.rs24
-rw-r--r--src/librustc_mir/const_eval.rs14
-rw-r--r--src/librustdoc/html/render.rs6
-rw-r--r--src/libserialize/hex.rs9
-rw-r--r--src/libserialize/json.rs12
-rw-r--r--src/libstd/env.rs2
-rw-r--r--src/libstd/error.rs160
-rw-r--r--src/libstd/ffi/c_str.rs5
-rw-r--r--src/libstd/io/buffered.rs1
-rw-r--r--src/libstd/io/error.rs13
-rw-r--r--src/libstd/net/parser.rs2
-rw-r--r--src/libstd/path.rs2
-rw-r--r--src/libstd/sync/mpsc/mod.rs5
-rw-r--r--src/libstd/sys/cloudabi/shims/os.rs1
-rw-r--r--src/libstd/sys/hermit/os.rs1
-rw-r--r--src/libstd/sys/sgx/net.rs1
-rw-r--r--src/libstd/sys/sgx/os.rs1
-rw-r--r--src/libstd/sys/unix/os.rs1
-rw-r--r--src/libstd/sys/vxworks/os.rs1
-rw-r--r--src/libstd/sys/wasi/os.rs1
-rw-r--r--src/libstd/sys/wasm/os.rs1
-rw-r--r--src/libstd/sys/windows/os.rs1
-rw-r--r--src/libstd/sys_common/poison.rs3
-rw-r--r--src/libstd/time.rs1
-rw-r--r--src/libsyntax_pos/fatal_error.rs6
-rw-r--r--src/libterm/terminfo/mod.rs10
-rw-r--r--src/test/ui/consts/miri_unleashed/const_refers_to_static.rs10
-rw-r--r--src/test/ui/consts/miri_unleashed/const_refers_to_static.stderr24
-rw-r--r--src/test/ui/consts/miri_unleashed/drop.rs20
-rw-r--r--src/test/ui/consts/miri_unleashed/drop.stderr24
-rw-r--r--src/test/ui/consts/miri_unleashed/mutable_const2.stderr2
-rw-r--r--src/test/ui/iterators/into-iter-on-arrays-lint.fixed25
-rw-r--r--src/test/ui/iterators/into-iter-on-arrays-lint.rs25
-rw-r--r--src/test/ui/iterators/into-iter-on-arrays-lint.stderr72
-rw-r--r--src/tools/error_index_generator/main.rs2
m---------src/tools/rls0
39 files changed, 308 insertions, 223 deletions
diff --git a/src/librustc_driver/args.rs b/src/librustc_driver/args.rs
index 339a10f9140..5e2c43596db 100644
--- a/src/librustc_driver/args.rs
+++ b/src/librustc_driver/args.rs
@@ -2,7 +2,6 @@ use std::error;
 use std::fmt;
 use std::fs;
 use std::io;
-use std::str;
 
 pub fn arg_expand(arg: String) -> Result<Vec<String>, Error> {
     if arg.starts_with("@") {
@@ -36,8 +35,4 @@ impl fmt::Display for Error {
     }
 }
 
-impl error::Error for Error {
-    fn description(&self) -> &'static str {
-        "argument error"
-    }
-}
+impl error::Error for Error {}
diff --git a/src/librustc_error_codes/error_codes/E0638.md b/src/librustc_error_codes/error_codes/E0638.md
index 29b7586b07b..14cd31502b6 100644
--- a/src/librustc_error_codes/error_codes/E0638.md
+++ b/src/librustc_error_codes/error_codes/E0638.md
@@ -10,23 +10,23 @@ For example, in the below example, since the enum is marked as
 on it.
 
 ```rust,ignore (pseudo-Rust)
-use std::error::Error as StdError;
-
-#[non_exhaustive] pub enum Error {
-   Message(String),
-   Other,
+#[non_exhaustive]
+pub enum Error {
+    Message(String),
+    Other,
 }
 
-impl StdError for Error {
-   fn description(&self) -> &str {
+impl Display for Error {
+    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
         // This will not error, despite being marked as non_exhaustive, as this
         // enum is defined within the current crate, it can be matched
         // exhaustively.
-        match *self {
-           Message(ref s) => s,
-           Other => "other or unknown error",
-        }
-   }
+        let display = match self {
+            Message(s) => s,
+            Other => "other or unknown error",
+        };
+        formatter.write_str(display)
+    }
 }
 ```
 
@@ -38,9 +38,9 @@ use mycrate::Error;
 // This will not error as the non_exhaustive Error enum has been matched with a
 // wildcard.
 match error {
-   Message(ref s) => ...,
-   Other => ...,
-   _ => ...,
+    Message(s) => ...,
+    Other => ...,
+    _ => ...,
 }
 ```
 
diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs
index 8f1437ee49c..e93106b7adf 100644
--- a/src/librustc_errors/lib.rs
+++ b/src/librustc_errors/lib.rs
@@ -253,11 +253,7 @@ impl fmt::Display for ExplicitBug {
     }
 }
 
-impl error::Error for ExplicitBug {
-    fn description(&self) -> &str {
-        "The parser has encountered an internal bug"
-    }
-}
+impl error::Error for ExplicitBug {}
 
 pub use diagnostic::{Diagnostic, DiagnosticId, DiagnosticStyledString, SubDiagnostic};
 pub use diagnostic_builder::DiagnosticBuilder;
diff --git a/src/librustc_lint/array_into_iter.rs b/src/librustc_lint/array_into_iter.rs
index 5a001ef18b2..b6075d165dd 100644
--- a/src/librustc_lint/array_into_iter.rs
+++ b/src/librustc_lint/array_into_iter.rs
@@ -44,14 +44,26 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ArrayIntoIter {
             // argument.
             let receiver_arg = &args[0];
 
-            // Test if the original `self` type is an array type.
-            match cx.tables.expr_ty(receiver_arg).kind {
-                ty::Array(..) => {}
-                _ => return,
+            // Peel all `Box<_>` layers. We have to special case `Box` here as
+            // `Box` is the only thing that values can be moved out of via
+            // method call. `Box::new([1]).into_iter()` should trigger this
+            // lint.
+            let mut recv_ty = cx.tables.expr_ty(receiver_arg);
+            let mut num_box_derefs = 0;
+            while recv_ty.is_box() {
+                num_box_derefs += 1;
+                recv_ty = recv_ty.boxed_ty();
+            }
+
+            // Make sure we found an array after peeling the boxes.
+            if !matches!(recv_ty.kind, ty::Array(..)) {
+                return;
             }
 
-            // Make sure that the first adjustment is an autoref coercion.
-            match cx.tables.expr_adjustments(receiver_arg).get(0) {
+            // Make sure that there is an autoref coercion at the expected
+            // position. The first `num_box_derefs` adjustments are the derefs
+            // of the box.
+            match cx.tables.expr_adjustments(receiver_arg).get(num_box_derefs) {
                 Some(Adjustment { kind: Adjust::Borrow(_), .. }) => {}
                 _ => return,
             }
diff --git a/src/librustc_mir/const_eval.rs b/src/librustc_mir/const_eval.rs
index 6cb73e0c8d7..8a3bab2a282 100644
--- a/src/librustc_mir/const_eval.rs
+++ b/src/librustc_mir/const_eval.rs
@@ -197,19 +197,7 @@ impl fmt::Display for ConstEvalError {
     }
 }
 
-impl Error for ConstEvalError {
-    fn description(&self) -> &str {
-        use self::ConstEvalError::*;
-        match *self {
-            NeedsRfc(_) => "this feature needs an rfc before being allowed inside constants",
-            ConstAccessesStatic => "constant accesses static",
-        }
-    }
-
-    fn cause(&self) -> Option<&dyn Error> {
-        None
-    }
-}
+impl Error for ConstEvalError {}
 
 // Extra machine state for CTFE, and the Machine instance
 pub struct CompileTimeInterpreter<'mir, 'tcx> {
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index f763255a932..b578e69e60b 100644
--- a/src/librustdoc/html/render.rs
+++ b/src/librustdoc/html/render.rs
@@ -98,11 +98,7 @@ pub struct Error {
     pub error: io::Error,
 }
 
-impl error::Error for Error {
-    fn description(&self) -> &str {
-        self.error.description()
-    }
-}
+impl error::Error for Error {}
 
 impl std::fmt::Display for Error {
     fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
diff --git a/src/libserialize/hex.rs b/src/libserialize/hex.rs
index a2a5a3cb59c..cfb165a3d43 100644
--- a/src/libserialize/hex.rs
+++ b/src/libserialize/hex.rs
@@ -68,14 +68,7 @@ impl fmt::Display for FromHexError {
     }
 }
 
-impl error::Error for FromHexError {
-    fn description(&self) -> &str {
-        match *self {
-            InvalidHexCharacter(..) => "invalid character",
-            InvalidHexLength => "invalid length",
-        }
-    }
-}
+impl error::Error for FromHexError {}
 
 impl FromHex for str {
     /// Converts any hexadecimal encoded string (literal, `@`, `&`, or `~`)
diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs
index b1ad0e853a3..1f9d43cb930 100644
--- a/src/libserialize/json.rs
+++ b/src/libserialize/json.rs
@@ -345,11 +345,7 @@ impl fmt::Display for DecoderError {
     }
 }
 
-impl std::error::Error for DecoderError {
-    fn description(&self) -> &str {
-        "decoder error"
-    }
-}
+impl std::error::Error for DecoderError {}
 
 impl fmt::Display for EncoderError {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
@@ -358,11 +354,7 @@ impl fmt::Display for EncoderError {
     }
 }
 
-impl std::error::Error for EncoderError {
-    fn description(&self) -> &str {
-        "encoder error"
-    }
-}
+impl std::error::Error for EncoderError {}
 
 impl From<fmt::Error> for EncoderError {
     /// Converts a [`fmt::Error`] into `EncoderError`
diff --git a/src/libstd/env.rs b/src/libstd/env.rs
index cf71b61b917..52eebcfcb94 100644
--- a/src/libstd/env.rs
+++ b/src/libstd/env.rs
@@ -284,6 +284,7 @@ impl fmt::Display for VarError {
 
 #[stable(feature = "env", since = "1.0.0")]
 impl Error for VarError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         match *self {
             VarError::NotPresent => "environment variable not found",
@@ -526,6 +527,7 @@ impl fmt::Display for JoinPathsError {
 
 #[stable(feature = "env", since = "1.0.0")]
 impl Error for JoinPathsError {
+    #[allow(deprecated, deprecated_in_future)]
     fn description(&self) -> &str {
         self.inner.description()
     }
diff --git a/src/libstd/error.rs b/src/libstd/error.rs
index 0992e40121a..1407fe27715 100644
--- a/src/libstd/error.rs
+++ b/src/libstd/error.rs
@@ -45,92 +45,6 @@ use crate::string;
 /// [`source`]: trait.Error.html#method.source
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait Error: Debug + Display {
-    /// **This method is soft-deprecated.**
-    ///
-    /// Although using it won’t cause compilation warning,
-    /// new code should use [`Display`] instead
-    /// and new `impl`s can omit it.
-    ///
-    /// To obtain error description as a string, use `to_string()`.
-    ///
-    /// [`Display`]: ../fmt/trait.Display.html
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// match "xc".parse::<u32>() {
-    ///     Err(e) => {
-    ///         // Print `e` itself, not `e.description()`.
-    ///         println!("Error: {}", e);
-    ///     }
-    ///     _ => println!("No error"),
-    /// }
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn description(&self) -> &str {
-        "description() is deprecated; use Display"
-    }
-
-    /// The lower-level cause of this error, if any.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use std::error::Error;
-    /// use std::fmt;
-    ///
-    /// #[derive(Debug)]
-    /// struct SuperError {
-    ///     side: SuperErrorSideKick,
-    /// }
-    ///
-    /// impl fmt::Display for SuperError {
-    ///     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-    ///         write!(f, "SuperError is here!")
-    ///     }
-    /// }
-    ///
-    /// impl Error for SuperError {
-    ///     fn cause(&self) -> Option<&dyn Error> {
-    ///         Some(&self.side)
-    ///     }
-    /// }
-    ///
-    /// #[derive(Debug)]
-    /// struct SuperErrorSideKick;
-    ///
-    /// impl fmt::Display for SuperErrorSideKick {
-    ///     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-    ///         write!(f, "SuperErrorSideKick is here!")
-    ///     }
-    /// }
-    ///
-    /// impl Error for SuperErrorSideKick {}
-    ///
-    /// fn get_super_error() -> Result<(), SuperError> {
-    ///     Err(SuperError { side: SuperErrorSideKick })
-    /// }
-    ///
-    /// fn main() {
-    ///     match get_super_error() {
-    ///         Err(e) => {
-    ///             println!("Error: {}", e.description());
-    ///             println!("Caused by: {}", e.cause().unwrap());
-    ///         }
-    ///         _ => println!("No error"),
-    ///     }
-    /// }
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    #[rustc_deprecated(
-        since = "1.33.0",
-        reason = "replaced by Error::source, which can support \
-                                                   downcasting"
-    )]
-    fn cause(&self) -> Option<&dyn Error> {
-        self.source()
-    }
-
     /// The lower-level source of this error, if any.
     ///
     /// # Examples
@@ -213,6 +127,28 @@ pub trait Error: Debug + Display {
     fn backtrace(&self) -> Option<&Backtrace> {
         None
     }
+
+    /// ```
+    /// if let Err(e) = "xc".parse::<u32>() {
+    ///     // Print `e` itself, no need for description().
+    ///     eprintln!("Error: {}", e);
+    /// }
+    /// ```
+    #[stable(feature = "rust1", since = "1.0.0")]
+    #[rustc_deprecated(since = "1.41.0", reason = "use the Display impl or to_string()")]
+    fn description(&self) -> &str {
+        "description() is deprecated; use Display"
+    }
+
+    #[stable(feature = "rust1", since = "1.0.0")]
+    #[rustc_deprecated(
+        since = "1.33.0",
+        reason = "replaced by Error::source, which can support downcasting"
+    )]
+    #[allow(missing_docs)]
+    fn cause(&self) -> Option<&dyn Error> {
+        self.source()
+    }
 }
 
 mod private {
@@ -318,6 +254,7 @@ impl From<String> for Box<dyn Error + Send + Sync> {
         struct StringError(String);
 
         impl Error for StringError {
+            #[allow(deprecated)]
             fn description(&self) -> &str {
                 &self.0
             }
@@ -454,47 +391,32 @@ impl<'a> From<Cow<'a, str>> for Box<dyn Error> {
 }
 
 #[unstable(feature = "never_type", issue = "35121")]
-impl Error for ! {
-    fn description(&self) -> &str {
-        *self
-    }
-}
+impl Error for ! {}
 
 #[unstable(
     feature = "allocator_api",
     reason = "the precise API and guarantees it provides may be tweaked.",
     issue = "32838"
 )]
-impl Error for AllocErr {
-    fn description(&self) -> &str {
-        "memory allocation failed"
-    }
-}
+impl Error for AllocErr {}
 
 #[unstable(
     feature = "allocator_api",
     reason = "the precise API and guarantees it provides may be tweaked.",
     issue = "32838"
 )]
-impl Error for LayoutErr {
-    fn description(&self) -> &str {
-        "invalid parameters to Layout::from_size_align"
-    }
-}
+impl Error for LayoutErr {}
 
 #[unstable(
     feature = "allocator_api",
     reason = "the precise API and guarantees it provides may be tweaked.",
     issue = "32838"
 )]
-impl Error for CannotReallocInPlace {
-    fn description(&self) -> &str {
-        CannotReallocInPlace::description(self)
-    }
-}
+impl Error for CannotReallocInPlace {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl Error for str::ParseBoolError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "failed to parse bool"
     }
@@ -502,6 +424,7 @@ impl Error for str::ParseBoolError {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl Error for str::Utf8Error {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "invalid utf-8: corrupt contents"
     }
@@ -509,6 +432,7 @@ impl Error for str::Utf8Error {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl Error for num::ParseIntError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         self.__description()
     }
@@ -516,6 +440,7 @@ impl Error for num::ParseIntError {
 
 #[stable(feature = "try_from", since = "1.34.0")]
 impl Error for num::TryFromIntError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         self.__description()
     }
@@ -523,6 +448,7 @@ impl Error for num::TryFromIntError {
 
 #[stable(feature = "try_from", since = "1.34.0")]
 impl Error for array::TryFromSliceError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         self.__description()
     }
@@ -530,6 +456,7 @@ impl Error for array::TryFromSliceError {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl Error for num::ParseFloatError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         self.__description()
     }
@@ -537,6 +464,7 @@ impl Error for num::ParseFloatError {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl Error for string::FromUtf8Error {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "invalid utf-8"
     }
@@ -544,6 +472,7 @@ impl Error for string::FromUtf8Error {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl Error for string::FromUtf16Error {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "invalid utf-16"
     }
@@ -558,6 +487,7 @@ impl Error for string::ParseError {
 
 #[stable(feature = "decode_utf16", since = "1.9.0")]
 impl Error for char::DecodeUtf16Error {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "unpaired surrogate found"
     }
@@ -565,6 +495,7 @@ impl Error for char::DecodeUtf16Error {
 
 #[stable(feature = "box_error", since = "1.8.0")]
 impl<T: Error> Error for Box<T> {
+    #[allow(deprecated, deprecated_in_future)]
     fn description(&self) -> &str {
         Error::description(&**self)
     }
@@ -581,6 +512,7 @@ impl<T: Error> Error for Box<T> {
 
 #[stable(feature = "fmt_error", since = "1.11.0")]
 impl Error for fmt::Error {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "an error occurred when formatting an argument"
     }
@@ -588,6 +520,7 @@ impl Error for fmt::Error {
 
 #[stable(feature = "try_borrow", since = "1.13.0")]
 impl Error for cell::BorrowError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "already mutably borrowed"
     }
@@ -595,6 +528,7 @@ impl Error for cell::BorrowError {
 
 #[stable(feature = "try_borrow", since = "1.13.0")]
 impl Error for cell::BorrowMutError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "already borrowed"
     }
@@ -602,6 +536,7 @@ impl Error for cell::BorrowMutError {
 
 #[stable(feature = "try_from", since = "1.34.0")]
 impl Error for char::CharTryFromError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "converted integer out of range for `char`"
     }
@@ -609,6 +544,7 @@ impl Error for char::CharTryFromError {
 
 #[stable(feature = "char_from_str", since = "1.20.0")]
 impl Error for char::ParseCharError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         self.__description()
     }
@@ -846,16 +782,8 @@ mod tests {
         }
     }
 
-    impl Error for A {
-        fn description(&self) -> &str {
-            "A-desc"
-        }
-    }
-    impl Error for B {
-        fn description(&self) -> &str {
-            "A-desc"
-        }
-    }
+    impl Error for A {}
+    impl Error for B {}
 
     #[test]
     fn downcasting() {
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs
index e4bebd0323c..d2ee65f0a74 100644
--- a/src/libstd/ffi/c_str.rs
+++ b/src/libstd/ffi/c_str.rs
@@ -878,6 +878,7 @@ impl NulError {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl Error for NulError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "nul byte found in data"
     }
@@ -903,6 +904,7 @@ impl From<NulError> for io::Error {
 
 #[stable(feature = "frombyteswithnulerror_impls", since = "1.17.0")]
 impl Error for FromBytesWithNulError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         match self.kind {
             FromBytesWithNulErrorKind::InteriorNul(..) => {
@@ -915,6 +917,7 @@ impl Error for FromBytesWithNulError {
 
 #[stable(feature = "frombyteswithnulerror_impls", since = "1.17.0")]
 impl fmt::Display for FromBytesWithNulError {
+    #[allow(deprecated, deprecated_in_future)]
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         f.write_str(self.description())?;
         if let FromBytesWithNulErrorKind::InteriorNul(pos) = self.kind {
@@ -943,6 +946,7 @@ impl IntoStringError {
 
 #[stable(feature = "cstring_into", since = "1.7.0")]
 impl Error for IntoStringError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "C string contained non-utf8 bytes"
     }
@@ -954,6 +958,7 @@ impl Error for IntoStringError {
 
 #[stable(feature = "cstring_into", since = "1.7.0")]
 impl fmt::Display for IntoStringError {
+    #[allow(deprecated, deprecated_in_future)]
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         self.description().fmt(f)
     }
diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs
index 3ba80e76672..fee5a4e102b 100644
--- a/src/libstd/io/buffered.rs
+++ b/src/libstd/io/buffered.rs
@@ -752,6 +752,7 @@ impl<W> From<IntoInnerError<W>> for Error {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<W: Send + fmt::Debug> error::Error for IntoInnerError<W> {
+    #[allow(deprecated, deprecated_in_future)]
     fn description(&self) -> &str {
         error::Error::description(self.error())
     }
diff --git a/src/libstd/io/error.rs b/src/libstd/io/error.rs
index efe839d1302..3b55d9b9002 100644
--- a/src/libstd/io/error.rs
+++ b/src/libstd/io/error.rs
@@ -534,6 +534,7 @@ impl fmt::Display for Error {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl error::Error for Error {
+    #[allow(deprecated, deprecated_in_future)]
     fn description(&self) -> &str {
         match self.repr {
             Repr::Os(..) | Repr::Simple(..) => self.kind().as_str(),
@@ -603,22 +604,18 @@ mod test {
         struct TestError;
 
         impl fmt::Display for TestError {
-            fn fmt(&self, _: &mut fmt::Formatter<'_>) -> fmt::Result {
-                Ok(())
+            fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+                f.write_str("asdf")
             }
         }
 
-        impl error::Error for TestError {
-            fn description(&self) -> &str {
-                "asdf"
-            }
-        }
+        impl error::Error for TestError {}
 
         // we have to call all of these UFCS style right now since method
         // resolution won't implicitly drop the Send+Sync bounds
         let mut err = Error::new(ErrorKind::Other, TestError);
         assert!(err.get_ref().unwrap().is::<TestError>());
-        assert_eq!("asdf", err.get_ref().unwrap().description());
+        assert_eq!("asdf", err.get_ref().unwrap().to_string());
         assert!(err.get_mut().unwrap().is::<TestError>());
         let extracted = err.into_inner().unwrap();
         extracted.downcast::<TestError>().unwrap();
diff --git a/src/libstd/net/parser.rs b/src/libstd/net/parser.rs
index c81506215c1..868a7e261c4 100644
--- a/src/libstd/net/parser.rs
+++ b/src/libstd/net/parser.rs
@@ -363,6 +363,7 @@ pub struct AddrParseError(());
 
 #[stable(feature = "addr_parse_error_error", since = "1.4.0")]
 impl fmt::Display for AddrParseError {
+    #[allow(deprecated, deprecated_in_future)]
     fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
         fmt.write_str(self.description())
     }
@@ -370,6 +371,7 @@ impl fmt::Display for AddrParseError {
 
 #[stable(feature = "addr_parse_error_error", since = "1.4.0")]
 impl Error for AddrParseError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "invalid IP address syntax"
     }
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index 42bca0a9575..580ff1610ac 100644
--- a/src/libstd/path.rs
+++ b/src/libstd/path.rs
@@ -2786,6 +2786,7 @@ impl_cmp_os_str!(Cow<'a, Path>, OsString);
 
 #[stable(since = "1.7.0", feature = "strip_prefix")]
 impl fmt::Display for StripPrefixError {
+    #[allow(deprecated, deprecated_in_future)]
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         self.description().fmt(f)
     }
@@ -2793,6 +2794,7 @@ impl fmt::Display for StripPrefixError {
 
 #[stable(since = "1.7.0", feature = "strip_prefix")]
 impl Error for StripPrefixError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "prefix not found"
     }
diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs
index 2831bbcb88d..0e334c191e7 100644
--- a/src/libstd/sync/mpsc/mod.rs
+++ b/src/libstd/sync/mpsc/mod.rs
@@ -1550,6 +1550,7 @@ impl<T> fmt::Display for SendError<T> {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: Send> error::Error for SendError<T> {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "sending on a closed channel"
     }
@@ -1577,6 +1578,7 @@ impl<T> fmt::Display for TrySendError<T> {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: Send> error::Error for TrySendError<T> {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         match *self {
             TrySendError::Full(..) => "sending on a full channel",
@@ -1603,6 +1605,7 @@ impl fmt::Display for RecvError {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl error::Error for RecvError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "receiving on a closed channel"
     }
@@ -1620,6 +1623,7 @@ impl fmt::Display for TryRecvError {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl error::Error for TryRecvError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         match *self {
             TryRecvError::Empty => "receiving on an empty channel",
@@ -1649,6 +1653,7 @@ impl fmt::Display for RecvTimeoutError {
 
 #[stable(feature = "mpsc_recv_timeout_error", since = "1.15.0")]
 impl error::Error for RecvTimeoutError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         match *self {
             RecvTimeoutError::Timeout => "timed out waiting on channel",
diff --git a/src/libstd/sys/cloudabi/shims/os.rs b/src/libstd/sys/cloudabi/shims/os.rs
index 944b9525b3b..779e6d54b7c 100644
--- a/src/libstd/sys/cloudabi/shims/os.rs
+++ b/src/libstd/sys/cloudabi/shims/os.rs
@@ -63,6 +63,7 @@ impl fmt::Display for JoinPathsError {
 }
 
 impl StdError for JoinPathsError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "not supported on CloudABI yet"
     }
diff --git a/src/libstd/sys/hermit/os.rs b/src/libstd/sys/hermit/os.rs
index ad63b0e0c13..5999fdd4f8d 100644
--- a/src/libstd/sys/hermit/os.rs
+++ b/src/libstd/sys/hermit/os.rs
@@ -61,6 +61,7 @@ impl fmt::Display for JoinPathsError {
 }
 
 impl StdError for JoinPathsError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "not supported on hermit yet"
     }
diff --git a/src/libstd/sys/sgx/net.rs b/src/libstd/sys/sgx/net.rs
index f36687b4d3d..bd0652ab464 100644
--- a/src/libstd/sys/sgx/net.rs
+++ b/src/libstd/sys/sgx/net.rs
@@ -440,6 +440,7 @@ pub struct NonIpSockAddr {
 }
 
 impl error::Error for NonIpSockAddr {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "Failed to convert address to SocketAddr"
     }
diff --git a/src/libstd/sys/sgx/os.rs b/src/libstd/sys/sgx/os.rs
index 2c5b3134219..6ed7a2f2044 100644
--- a/src/libstd/sys/sgx/os.rs
+++ b/src/libstd/sys/sgx/os.rs
@@ -66,6 +66,7 @@ impl fmt::Display for JoinPathsError {
 }
 
 impl StdError for JoinPathsError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "not supported in SGX yet"
     }
diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs
index 95be564b330..b0b14725344 100644
--- a/src/libstd/sys/unix/os.rs
+++ b/src/libstd/sys/unix/os.rs
@@ -213,6 +213,7 @@ impl fmt::Display for JoinPathsError {
 }
 
 impl StdError for JoinPathsError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "failed to join paths"
     }
diff --git a/src/libstd/sys/vxworks/os.rs b/src/libstd/sys/vxworks/os.rs
index b37a1790454..3f207cabf97 100644
--- a/src/libstd/sys/vxworks/os.rs
+++ b/src/libstd/sys/vxworks/os.rs
@@ -173,6 +173,7 @@ impl fmt::Display for JoinPathsError {
 }
 
 impl StdError for JoinPathsError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "failed to join paths"
     }
diff --git a/src/libstd/sys/wasi/os.rs b/src/libstd/sys/wasi/os.rs
index 338fbe89765..44a08a2f058 100644
--- a/src/libstd/sys/wasi/os.rs
+++ b/src/libstd/sys/wasi/os.rs
@@ -78,6 +78,7 @@ impl fmt::Display for JoinPathsError {
 }
 
 impl StdError for JoinPathsError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "not supported on wasm yet"
     }
diff --git a/src/libstd/sys/wasm/os.rs b/src/libstd/sys/wasm/os.rs
index 193c3892743..91afdc8a5a0 100644
--- a/src/libstd/sys/wasm/os.rs
+++ b/src/libstd/sys/wasm/os.rs
@@ -53,6 +53,7 @@ impl fmt::Display for JoinPathsError {
 }
 
 impl StdError for JoinPathsError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "not supported on wasm yet"
     }
diff --git a/src/libstd/sys/windows/os.rs b/src/libstd/sys/windows/os.rs
index 8631e50cf38..e0a1d2f4c0e 100644
--- a/src/libstd/sys/windows/os.rs
+++ b/src/libstd/sys/windows/os.rs
@@ -225,6 +225,7 @@ impl fmt::Display for JoinPathsError {
 }
 
 impl StdError for JoinPathsError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "failed to join paths"
     }
diff --git a/src/libstd/sys_common/poison.rs b/src/libstd/sys_common/poison.rs
index 0157b952996..285851d631a 100644
--- a/src/libstd/sys_common/poison.rs
+++ b/src/libstd/sys_common/poison.rs
@@ -148,6 +148,7 @@ impl<T> fmt::Display for PoisonError<T> {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T> Error for PoisonError<T> {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "poisoned lock: another task failed inside"
     }
@@ -239,6 +240,7 @@ impl<T> fmt::Display for TryLockError<T> {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T> Error for TryLockError<T> {
+    #[allow(deprecated, deprecated_in_future)]
     fn description(&self) -> &str {
         match *self {
             TryLockError::Poisoned(ref p) => p.description(),
@@ -246,6 +248,7 @@ impl<T> Error for TryLockError<T> {
         }
     }
 
+    #[allow(deprecated)]
     fn cause(&self) -> Option<&dyn Error> {
         match *self {
             TryLockError::Poisoned(ref p) => Some(p),
diff --git a/src/libstd/time.rs b/src/libstd/time.rs
index e1ae01b602a..03f1ef0000a 100644
--- a/src/libstd/time.rs
+++ b/src/libstd/time.rs
@@ -621,6 +621,7 @@ impl SystemTimeError {
 
 #[stable(feature = "time2", since = "1.8.0")]
 impl Error for SystemTimeError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "other time was not earlier than self"
     }
diff --git a/src/libsyntax_pos/fatal_error.rs b/src/libsyntax_pos/fatal_error.rs
index cf7c677d59d..718c0ddbc63 100644
--- a/src/libsyntax_pos/fatal_error.rs
+++ b/src/libsyntax_pos/fatal_error.rs
@@ -23,8 +23,4 @@ impl std::fmt::Display for FatalError {
     }
 }
 
-impl std::error::Error for FatalError {
-    fn description(&self) -> &str {
-        "The parser has encountered a fatal error"
-    }
-}
+impl std::error::Error for FatalError {}
diff --git a/src/libterm/terminfo/mod.rs b/src/libterm/terminfo/mod.rs
index 5db1d5f4278..f1adc536a3d 100644
--- a/src/libterm/terminfo/mod.rs
+++ b/src/libterm/terminfo/mod.rs
@@ -42,14 +42,10 @@ pub enum Error {
 }
 
 impl error::Error for Error {
-    fn description(&self) -> &str {
-        "failed to create TermInfo"
-    }
-
-    fn cause(&self) -> Option<&dyn error::Error> {
+    fn source(&self) -> Option<&(dyn error::Error + 'static)> {
         use Error::*;
-        match *self {
-            IoError(ref e) => Some(e),
+        match self {
+            IoError(e) => Some(e),
             _ => None,
         }
     }
diff --git a/src/test/ui/consts/miri_unleashed/const_refers_to_static.rs b/src/test/ui/consts/miri_unleashed/const_refers_to_static.rs
index 55f3f1c8488..e07db3ffba2 100644
--- a/src/test/ui/consts/miri_unleashed/const_refers_to_static.rs
+++ b/src/test/ui/consts/miri_unleashed/const_refers_to_static.rs
@@ -6,31 +6,31 @@
 use std::sync::atomic::AtomicUsize;
 use std::sync::atomic::Ordering;
 
-const BOO: &usize = { //~ ERROR undefined behavior to use this value
+const REF_INTERIOR_MUT: &usize = { //~ ERROR undefined behavior to use this value
     static FOO: AtomicUsize = AtomicUsize::new(0);
     unsafe { &*(&FOO as *const _ as *const usize) }
     //~^ WARN skipping const checks
 };
 
-const FOO: usize = {
+const MUTATE_INTERIOR_MUT: usize = {
     static FOO: AtomicUsize = AtomicUsize::new(0);
     FOO.fetch_add(1, Ordering::Relaxed) //~ WARN any use of this value will cause an error
     //~^ WARN skipping const checks
     //~| WARN skipping const checks
 };
 
-const BAR: usize = {
+const READ_INTERIOR_MUT: usize = {
     static FOO: AtomicUsize = AtomicUsize::new(0);
     unsafe { *(&FOO as *const _ as *const usize) } //~ WARN any use of this value will cause an err
     //~^ WARN skipping const checks
 };
 
 static mut MUTABLE: u32 = 0;
-const BAD: u32 = unsafe { MUTABLE }; //~ WARN any use of this value will cause an error
+const READ_MUT: u32 = unsafe { MUTABLE }; //~ WARN any use of this value will cause an error
 //~^ WARN skipping const checks
 
 // ok some day perhaps
-const BOO_OK: &usize = { //~ ERROR it is undefined behavior to use this value
+const READ_IMMUT: &usize = { //~ ERROR it is undefined behavior to use this value
     static FOO: usize = 0;
     &FOO
     //~^ WARN skipping const checks
diff --git a/src/test/ui/consts/miri_unleashed/const_refers_to_static.stderr b/src/test/ui/consts/miri_unleashed/const_refers_to_static.stderr
index 6ae88558d70..eae76c1389b 100644
--- a/src/test/ui/consts/miri_unleashed/const_refers_to_static.stderr
+++ b/src/test/ui/consts/miri_unleashed/const_refers_to_static.stderr
@@ -23,10 +23,10 @@ LL |     unsafe { *(&FOO as *const _ as *const usize) }
    |                 ^^^
 
 warning: skipping const checks
-  --> $DIR/const_refers_to_static.rs:29:27
+  --> $DIR/const_refers_to_static.rs:29:32
    |
-LL | const BAD: u32 = unsafe { MUTABLE };
-   |                           ^^^^^^^
+LL | const READ_MUT: u32 = unsafe { MUTABLE };
+   |                                ^^^^^^^
 
 warning: skipping const checks
   --> $DIR/const_refers_to_static.rs:35:6
@@ -37,7 +37,7 @@ LL |     &FOO
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/const_refers_to_static.rs:9:1
    |
-LL | / const BOO: &usize = {
+LL | / const REF_INTERIOR_MUT: &usize = {
 LL | |     static FOO: AtomicUsize = AtomicUsize::new(0);
 LL | |     unsafe { &*(&FOO as *const _ as *const usize) }
 LL | |
@@ -49,7 +49,7 @@ LL | | };
 warning: any use of this value will cause an error
   --> $DIR/const_refers_to_static.rs:17:5
    |
-LL | / const FOO: usize = {
+LL | / const MUTATE_INTERIOR_MUT: usize = {
 LL | |     static FOO: AtomicUsize = AtomicUsize::new(0);
 LL | |     FOO.fetch_add(1, Ordering::Relaxed)
    | |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `std::sync::atomic::AtomicUsize::fetch_add`
@@ -67,7 +67,7 @@ LL | #![warn(const_err)]
 warning: any use of this value will cause an error
   --> $DIR/const_refers_to_static.rs:24:14
    |
-LL | / const BAR: usize = {
+LL | / const READ_INTERIOR_MUT: usize = {
 LL | |     static FOO: AtomicUsize = AtomicUsize::new(0);
 LL | |     unsafe { *(&FOO as *const _ as *const usize) }
    | |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
@@ -76,17 +76,17 @@ LL | | };
    | |__-
 
 warning: any use of this value will cause an error
-  --> $DIR/const_refers_to_static.rs:29:27
+  --> $DIR/const_refers_to_static.rs:29:32
    |
-LL | const BAD: u32 = unsafe { MUTABLE };
-   | --------------------------^^^^^^^---
-   |                           |
-   |                           constant accesses static
+LL | const READ_MUT: u32 = unsafe { MUTABLE };
+   | -------------------------------^^^^^^^---
+   |                                |
+   |                                constant accesses static
 
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/const_refers_to_static.rs:33:1
    |
-LL | / const BOO_OK: &usize = {
+LL | / const READ_IMMUT: &usize = {
 LL | |     static FOO: usize = 0;
 LL | |     &FOO
 LL | |
diff --git a/src/test/ui/consts/miri_unleashed/drop.rs b/src/test/ui/consts/miri_unleashed/drop.rs
new file mode 100644
index 00000000000..d66ca53dfb8
--- /dev/null
+++ b/src/test/ui/consts/miri_unleashed/drop.rs
@@ -0,0 +1,20 @@
+// compile-flags: -Zunleash-the-miri-inside-of-you
+// ignore-x86 FIXME: missing sysroot spans (#53081)
+// error-pattern: calling non-const function `<std::vec::Vec<i32> as std::ops::Drop>::drop`
+#![deny(const_err)]
+
+use std::mem::ManuallyDrop;
+
+fn main() {}
+
+static TEST_OK: () = {
+    let v: Vec<i32> = Vec::new();
+    let _v = ManuallyDrop::new(v);
+};
+
+// Make sure we catch executing bad drop functions.
+// The actual error is tested by the error-pattern above.
+static TEST_BAD: () = {
+    let _v: Vec<i32> = Vec::new();
+    //~^ WARN skipping const check
+};
diff --git a/src/test/ui/consts/miri_unleashed/drop.stderr b/src/test/ui/consts/miri_unleashed/drop.stderr
new file mode 100644
index 00000000000..5603eeb6dc0
--- /dev/null
+++ b/src/test/ui/consts/miri_unleashed/drop.stderr
@@ -0,0 +1,24 @@
+warning: skipping const checks
+  --> $DIR/drop.rs:18:9
+   |
+LL |     let _v: Vec<i32> = Vec::new();
+   |         ^^
+
+error[E0080]: could not evaluate static initializer
+  --> $SRC_DIR/libcore/ptr/mod.rs:LL:COL
+   |
+LL | / unsafe fn real_drop_in_place<T: ?Sized>(to_drop: &mut T) {
+LL | |     // Code here does not matter - this is replaced by the
+LL | |     // real drop glue by the compiler.
+LL | |     real_drop_in_place(to_drop)
+LL | | }
+   | |_^ calling non-const function `<std::vec::Vec<i32> as std::ops::Drop>::drop`
+   | 
+  ::: $DIR/drop.rs:20:1
+   |
+LL |   };
+   |   - inside call to `std::ptr::real_drop_in_place::<std::vec::Vec<i32>> - shim(Some(std::vec::Vec<i32>))` at $DIR/drop.rs:20:1
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0080`.
diff --git a/src/test/ui/consts/miri_unleashed/mutable_const2.stderr b/src/test/ui/consts/miri_unleashed/mutable_const2.stderr
index 2b4e23cd46e..2212b7d75d2 100644
--- a/src/test/ui/consts/miri_unleashed/mutable_const2.stderr
+++ b/src/test/ui/consts/miri_unleashed/mutable_const2.stderr
@@ -10,7 +10,7 @@ error: internal compiler error: mutable allocation in constant
 LL | const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *mut _;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:349:17
+thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:345:17
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
 
 error: internal compiler error: unexpected panic
diff --git a/src/test/ui/iterators/into-iter-on-arrays-lint.fixed b/src/test/ui/iterators/into-iter-on-arrays-lint.fixed
index f88a52d3159..c1aa3d70f77 100644
--- a/src/test/ui/iterators/into-iter-on-arrays-lint.fixed
+++ b/src/test/ui/iterators/into-iter-on-arrays-lint.fixed
@@ -19,6 +19,31 @@ fn main() {
     //~^ WARNING this method call currently resolves to `<&[T] as IntoIterator>::into_iter`
     //~| WARNING this was previously accepted by the compiler but is being phased out
 
+    Box::new(small).iter();
+    //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter`
+    //~| WARNING this was previously accepted by the compiler but is being phased out
+    Box::new([1, 2]).iter();
+    //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter`
+    //~| WARNING this was previously accepted by the compiler but is being phased out
+    Box::new(big).iter();
+    //~^ WARNING this method call currently resolves to `<&[T] as IntoIterator>::into_iter`
+    //~| WARNING this was previously accepted by the compiler but is being phased out
+    Box::new([0u8; 33]).iter();
+    //~^ WARNING this method call currently resolves to `<&[T] as IntoIterator>::into_iter`
+    //~| WARNING this was previously accepted by the compiler but is being phased out
+
+    Box::new(Box::new(small)).iter();
+    //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter`
+    //~| WARNING this was previously accepted by the compiler but is being phased out
+    Box::new(Box::new([1, 2])).iter();
+    //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter`
+    //~| WARNING this was previously accepted by the compiler but is being phased out
+    Box::new(Box::new(big)).iter();
+    //~^ WARNING this method call currently resolves to `<&[T] as IntoIterator>::into_iter`
+    //~| WARNING this was previously accepted by the compiler but is being phased out
+    Box::new(Box::new([0u8; 33])).iter();
+    //~^ WARNING this method call currently resolves to `<&[T] as IntoIterator>::into_iter`
+    //~| WARNING this was previously accepted by the compiler but is being phased out
 
     // Expressions that should not
     (&[1, 2]).into_iter();
diff --git a/src/test/ui/iterators/into-iter-on-arrays-lint.rs b/src/test/ui/iterators/into-iter-on-arrays-lint.rs
index e1a4b535f38..afdf6cb7f44 100644
--- a/src/test/ui/iterators/into-iter-on-arrays-lint.rs
+++ b/src/test/ui/iterators/into-iter-on-arrays-lint.rs
@@ -19,6 +19,31 @@ fn main() {
     //~^ WARNING this method call currently resolves to `<&[T] as IntoIterator>::into_iter`
     //~| WARNING this was previously accepted by the compiler but is being phased out
 
+    Box::new(small).into_iter();
+    //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter`
+    //~| WARNING this was previously accepted by the compiler but is being phased out
+    Box::new([1, 2]).into_iter();
+    //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter`
+    //~| WARNING this was previously accepted by the compiler but is being phased out
+    Box::new(big).into_iter();
+    //~^ WARNING this method call currently resolves to `<&[T] as IntoIterator>::into_iter`
+    //~| WARNING this was previously accepted by the compiler but is being phased out
+    Box::new([0u8; 33]).into_iter();
+    //~^ WARNING this method call currently resolves to `<&[T] as IntoIterator>::into_iter`
+    //~| WARNING this was previously accepted by the compiler but is being phased out
+
+    Box::new(Box::new(small)).into_iter();
+    //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter`
+    //~| WARNING this was previously accepted by the compiler but is being phased out
+    Box::new(Box::new([1, 2])).into_iter();
+    //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter`
+    //~| WARNING this was previously accepted by the compiler but is being phased out
+    Box::new(Box::new(big)).into_iter();
+    //~^ WARNING this method call currently resolves to `<&[T] as IntoIterator>::into_iter`
+    //~| WARNING this was previously accepted by the compiler but is being phased out
+    Box::new(Box::new([0u8; 33])).into_iter();
+    //~^ WARNING this method call currently resolves to `<&[T] as IntoIterator>::into_iter`
+    //~| WARNING this was previously accepted by the compiler but is being phased out
 
     // Expressions that should not
     (&[1, 2]).into_iter();
diff --git a/src/test/ui/iterators/into-iter-on-arrays-lint.stderr b/src/test/ui/iterators/into-iter-on-arrays-lint.stderr
index b5964bd44bf..e9cc427f6d8 100644
--- a/src/test/ui/iterators/into-iter-on-arrays-lint.stderr
+++ b/src/test/ui/iterators/into-iter-on-arrays-lint.stderr
@@ -35,3 +35,75 @@ LL |     [0u8; 33].into_iter();
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
 
+warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added.
+  --> $DIR/into-iter-on-arrays-lint.rs:22:21
+   |
+LL |     Box::new(small).into_iter();
+   |                     ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter`
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+
+warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added.
+  --> $DIR/into-iter-on-arrays-lint.rs:25:22
+   |
+LL |     Box::new([1, 2]).into_iter();
+   |                      ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter`
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+
+warning: this method call currently resolves to `<&[T] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added.
+  --> $DIR/into-iter-on-arrays-lint.rs:28:19
+   |
+LL |     Box::new(big).into_iter();
+   |                   ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter`
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+
+warning: this method call currently resolves to `<&[T] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added.
+  --> $DIR/into-iter-on-arrays-lint.rs:31:25
+   |
+LL |     Box::new([0u8; 33]).into_iter();
+   |                         ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter`
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+
+warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added.
+  --> $DIR/into-iter-on-arrays-lint.rs:35:31
+   |
+LL |     Box::new(Box::new(small)).into_iter();
+   |                               ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter`
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+
+warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added.
+  --> $DIR/into-iter-on-arrays-lint.rs:38:32
+   |
+LL |     Box::new(Box::new([1, 2])).into_iter();
+   |                                ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter`
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+
+warning: this method call currently resolves to `<&[T] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added.
+  --> $DIR/into-iter-on-arrays-lint.rs:41:29
+   |
+LL |     Box::new(Box::new(big)).into_iter();
+   |                             ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter`
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+
+warning: this method call currently resolves to `<&[T] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added.
+  --> $DIR/into-iter-on-arrays-lint.rs:44:35
+   |
+LL |     Box::new(Box::new([0u8; 33])).into_iter();
+   |                                   ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter`
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+
diff --git a/src/tools/error_index_generator/main.rs b/src/tools/error_index_generator/main.rs
index 1a4df167183..c1777f7ea03 100644
--- a/src/tools/error_index_generator/main.rs
+++ b/src/tools/error_index_generator/main.rs
@@ -286,7 +286,7 @@ fn main() {
     let (format, dst) = parse_args();
     let result = syntax::with_default_globals(move || main_with_result(format, &dst));
     if let Err(e) = result {
-        panic!("{}", e.description());
+        panic!("{}", e.to_string());
     }
 }
 
diff --git a/src/tools/rls b/src/tools/rls
-Subproject 8f1c2756d76c3dd728b925b65eec0106eb3102e
+Subproject fed7a31cd93bbd3c8a9f38871838b59b5dce2a3