about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoman Proskuryakov <humbug@deeptown.org>2020-07-05 15:02:01 +0300
committerRoman Proskuryakov <humbug@deeptown.org>2020-07-05 15:47:08 +0300
commiteff62069ad602090e8d27b83cffd9e77479ed4be (patch)
tree6fb5ca35f019a29a7c41ce206d53c17968376c75
parent7d4a92d4f8dc03409984695d78893fffdd3ff1f9 (diff)
downloadrust-eff62069ad602090e8d27b83cffd9e77479ed4be.tar.gz
rust-eff62069ad602090e8d27b83cffd9e77479ed4be.zip
Remove the usage of the LengthAtMost32 trait
-rw-r--r--src/liballoc/boxed.rs11
-rw-r--r--src/liballoc/collections/vec_deque.rs7
-rw-r--r--src/liballoc/rc.rs6
-rw-r--r--src/liballoc/sync.rs6
-rw-r--r--src/liballoc/vec.rs24
-rw-r--r--src/libcore/array/iter.rs45
-rw-r--r--src/libcore/array/mod.rs51
-rw-r--r--src/test/ui/const-generics/array-impls/alloc-traits-impls-length-33.rs40
-rw-r--r--src/test/ui/const-generics/array-impls/alloc-traits-no-impls-length-33.rs43
-rw-r--r--src/test/ui/const-generics/array-impls/alloc-traits-no-impls-length-33.stderr63
-rw-r--r--src/test/ui/const-generics/array-impls/alloc-types-impls-length-33.rs25
-rw-r--r--src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs33
-rw-r--r--src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.stderr97
-rw-r--r--src/test/ui/const-generics/array-impls/core-traits-impls-length-33.rs66
-rw-r--r--src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.rs29
-rw-r--r--src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.stderr51
-rw-r--r--src/test/ui/const-generics/array-impls/into-iter-impls-length-33.rs41
-rw-r--r--src/test/ui/const-generics/array-impls/into-iter-no-impls-length-33.rs53
-rw-r--r--src/test/ui/const-generics/array-impls/into-iter-no-impls-length-33.stderr143
-rw-r--r--src/test/ui/const-generics/broken-mir-2.rs3
-rw-r--r--src/test/ui/const-generics/broken-mir-2.stderr16
-rw-r--r--src/test/ui/const-generics/derive-debug-array-wrapper.rs4
-rw-r--r--src/test/ui/const-generics/derive-debug-array-wrapper.stderr16
-rw-r--r--src/test/ui/consts/too_generic_eval_ice.rs3
-rw-r--r--src/test/ui/consts/too_generic_eval_ice.stderr20
-rw-r--r--src/test/ui/iterators/into-iter-on-arrays-lint.fixed12
-rw-r--r--src/test/ui/iterators/into-iter-on-arrays-lint.rs12
-rw-r--r--src/test/ui/iterators/into-iter-on-arrays-lint.stderr12
28 files changed, 251 insertions, 681 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index 3320ebdf821..f225aa18853 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -130,7 +130,6 @@
 #![stable(feature = "rust1", since = "1.0.0")]
 
 use core::any::Any;
-use core::array::LengthAtMost32;
 use core::borrow;
 use core::cmp::Ordering;
 use core::convert::{From, TryFrom};
@@ -871,10 +870,7 @@ impl From<Box<str>> for Box<[u8]> {
 }
 
 #[stable(feature = "box_from_array", since = "1.45.0")]
-impl<T, const N: usize> From<[T; N]> for Box<[T]>
-where
-    [T; N]: LengthAtMost32,
-{
+impl<T, const N: usize> From<[T; N]> for Box<[T]> {
     /// Converts a `[T; N]` into a `Box<[T]>`
     ///
     /// This conversion moves the array to newly heap-allocated memory.
@@ -890,10 +886,7 @@ where
 }
 
 #[stable(feature = "boxed_slice_try_from", since = "1.43.0")]
-impl<T, const N: usize> TryFrom<Box<[T]>> for Box<[T; N]>
-where
-    [T; N]: LengthAtMost32,
-{
+impl<T, const N: usize> TryFrom<Box<[T]>> for Box<[T; N]> {
     type Error = Box<[T]>;
 
     fn try_from(boxed_slice: Box<[T]>) -> Result<Self, Self::Error> {
diff --git a/src/liballoc/collections/vec_deque.rs b/src/liballoc/collections/vec_deque.rs
index 15f3a94ca2d..ba455b1e5b7 100644
--- a/src/liballoc/collections/vec_deque.rs
+++ b/src/liballoc/collections/vec_deque.rs
@@ -9,7 +9,6 @@
 
 // ignore-tidy-filelength
 
-use core::array::LengthAtMost32;
 use core::cmp::{self, Ordering};
 use core::fmt;
 use core::hash::{Hash, Hasher};
@@ -2799,9 +2798,9 @@ macro_rules! __impl_slice_eq1 {
 __impl_slice_eq1! { [] VecDeque<A>, Vec<B>, }
 __impl_slice_eq1! { [] VecDeque<A>, &[B], }
 __impl_slice_eq1! { [] VecDeque<A>, &mut [B], }
-__impl_slice_eq1! { [const N: usize] VecDeque<A>, [B; N], [B; N]: LengthAtMost32 }
-__impl_slice_eq1! { [const N: usize] VecDeque<A>, &[B; N], [B; N]: LengthAtMost32 }
-__impl_slice_eq1! { [const N: usize] VecDeque<A>, &mut [B; N], [B; N]: LengthAtMost32 }
+__impl_slice_eq1! { [const N: usize] VecDeque<A>, [B; N], }
+__impl_slice_eq1! { [const N: usize] VecDeque<A>, &[B; N], }
+__impl_slice_eq1! { [const N: usize] VecDeque<A>, &mut [B; N], }
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<A: PartialOrd> PartialOrd for VecDeque<A> {
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index 4d50ae9efca..fd25e6935af 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -235,7 +235,6 @@ use crate::boxed::Box;
 use std::boxed::Box;
 
 use core::any::Any;
-use core::array::LengthAtMost32;
 use core::borrow;
 use core::cell::Cell;
 use core::cmp::Ordering;
@@ -1522,10 +1521,7 @@ where
 }
 
 #[stable(feature = "boxed_slice_try_from", since = "1.43.0")]
-impl<T, const N: usize> TryFrom<Rc<[T]>> for Rc<[T; N]>
-where
-    [T; N]: LengthAtMost32,
-{
+impl<T, const N: usize> TryFrom<Rc<[T]>> for Rc<[T; N]> {
     type Error = Rc<[T]>;
 
     fn try_from(boxed_slice: Rc<[T]>) -> Result<Self, Self::Error> {
diff --git a/src/liballoc/sync.rs b/src/liballoc/sync.rs
index 826f0c8fa83..9a0daa20160 100644
--- a/src/liballoc/sync.rs
+++ b/src/liballoc/sync.rs
@@ -7,7 +7,6 @@
 //! [arc]: struct.Arc.html
 
 use core::any::Any;
-use core::array::LengthAtMost32;
 use core::borrow;
 use core::cmp::Ordering;
 use core::convert::{From, TryFrom};
@@ -2159,10 +2158,7 @@ where
 }
 
 #[stable(feature = "boxed_slice_try_from", since = "1.43.0")]
-impl<T, const N: usize> TryFrom<Arc<[T]>> for Arc<[T; N]>
-where
-    [T; N]: LengthAtMost32,
-{
+impl<T, const N: usize> TryFrom<Arc<[T]>> for Arc<[T; N]> {
     type Error = Arc<[T]>;
 
     fn try_from(boxed_slice: Arc<[T]>) -> Result<Self, Self::Error> {
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs
index 5db96a504a6..3f05719ba9a 100644
--- a/src/liballoc/vec.rs
+++ b/src/liballoc/vec.rs
@@ -59,7 +59,6 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
-use core::array::LengthAtMost32;
 use core::cmp::{self, Ordering};
 use core::fmt;
 use core::hash::{Hash, Hasher};
@@ -2379,18 +2378,18 @@ __impl_slice_eq1! { [] &mut [A], Vec<B>, #[stable(feature = "partialeq_vec_for_r
 __impl_slice_eq1! { [] Cow<'_, [A]>, Vec<B> where A: Clone, #[stable(feature = "rust1", since = "1.0.0")] }
 __impl_slice_eq1! { [] Cow<'_, [A]>, &[B] where A: Clone, #[stable(feature = "rust1", since = "1.0.0")] }
 __impl_slice_eq1! { [] Cow<'_, [A]>, &mut [B] where A: Clone, #[stable(feature = "rust1", since = "1.0.0")] }
-__impl_slice_eq1! { [const N: usize] Vec<A>, [B; N] where [B; N]: LengthAtMost32, #[stable(feature = "rust1", since = "1.0.0")] }
-__impl_slice_eq1! { [const N: usize] Vec<A>, &[B; N] where [B; N]: LengthAtMost32, #[stable(feature = "rust1", since = "1.0.0")] }
+__impl_slice_eq1! { [const N: usize] Vec<A>, [B; N], #[stable(feature = "rust1", since = "1.0.0")] }
+__impl_slice_eq1! { [const N: usize] Vec<A>, &[B; N], #[stable(feature = "rust1", since = "1.0.0")] }
 
 // NOTE: some less important impls are omitted to reduce code bloat
 // FIXME(Centril): Reconsider this?
-//__impl_slice_eq1! { [const N: usize] Vec<A>, &mut [B; N], [B; N]: LengthAtMost32 }
-//__impl_slice_eq1! { [const N: usize] [A; N], Vec<B>, [A; N]: LengthAtMost32 }
-//__impl_slice_eq1! { [const N: usize] &[A; N], Vec<B>, [A; N]: LengthAtMost32 }
-//__impl_slice_eq1! { [const N: usize] &mut [A; N], Vec<B>, [A; N]: LengthAtMost32 }
-//__impl_slice_eq1! { [const N: usize] Cow<'a, [A]>, [B; N], [B; N]: LengthAtMost32 }
-//__impl_slice_eq1! { [const N: usize] Cow<'a, [A]>, &[B; N], [B; N]: LengthAtMost32 }
-//__impl_slice_eq1! { [const N: usize] Cow<'a, [A]>, &mut [B; N], [B; N]: LengthAtMost32 }
+//__impl_slice_eq1! { [const N: usize] Vec<A>, &mut [B; N], }
+//__impl_slice_eq1! { [const N: usize] [A; N], Vec<B>, }
+//__impl_slice_eq1! { [const N: usize] &[A; N], Vec<B>, }
+//__impl_slice_eq1! { [const N: usize] &mut [A; N], Vec<B>, }
+//__impl_slice_eq1! { [const N: usize] Cow<'a, [A]>, [B; N], }
+//__impl_slice_eq1! { [const N: usize] Cow<'a, [A]>, &[B; N], }
+//__impl_slice_eq1! { [const N: usize] Cow<'a, [A]>, &mut [B; N], }
 
 /// Implements comparison of vectors, lexicographically.
 #[stable(feature = "rust1", since = "1.0.0")]
@@ -2494,10 +2493,7 @@ impl<T: Clone> From<&mut [T]> for Vec<T> {
 }
 
 #[stable(feature = "vec_from_array", since = "1.44.0")]
-impl<T, const N: usize> From<[T; N]> for Vec<T>
-where
-    [T; N]: LengthAtMost32,
-{
+impl<T, const N: usize> From<[T; N]> for Vec<T> {
     #[cfg(not(test))]
     fn from(s: [T; N]) -> Vec<T> {
         <[T]>::into_vec(box s)
diff --git a/src/libcore/array/iter.rs b/src/libcore/array/iter.rs
index f6b8d4ba081..174f7e26efb 100644
--- a/src/libcore/array/iter.rs
+++ b/src/libcore/array/iter.rs
@@ -1,6 +1,5 @@
 //! Defines the `IntoIter` owned iterator for arrays.
 
-use super::LengthAtMost32;
 use crate::{
     fmt,
     iter::{ExactSizeIterator, FusedIterator, TrustedLen},
@@ -13,10 +12,7 @@ use crate::{
 ///
 /// [array]: ../../std/primitive.array.html
 #[unstable(feature = "array_value_iter", issue = "65798")]
-pub struct IntoIter<T, const N: usize>
-where
-    [T; N]: LengthAtMost32,
-{
+pub struct IntoIter<T, const N: usize> {
     /// This is the array we are iterating over.
     ///
     /// Elements with index `i` where `alive.start <= i < alive.end` have not
@@ -39,10 +35,7 @@ where
     alive: Range<usize>,
 }
 
-impl<T, const N: usize> IntoIter<T, N>
-where
-    [T; N]: LengthAtMost32,
-{
+impl<T, const N: usize> IntoIter<T, N> {
     /// Creates a new iterator over the given `array`.
     ///
     /// *Note*: this method might never get stabilized and/or removed in the
@@ -99,10 +92,7 @@ where
 }
 
 #[stable(feature = "array_value_iter_impls", since = "1.40.0")]
-impl<T, const N: usize> Iterator for IntoIter<T, N>
-where
-    [T; N]: LengthAtMost32,
-{
+impl<T, const N: usize> Iterator for IntoIter<T, N> {
     type Item = T;
     fn next(&mut self) -> Option<Self::Item> {
         if self.alive.start == self.alive.end {
@@ -146,10 +136,7 @@ where
 }
 
 #[stable(feature = "array_value_iter_impls", since = "1.40.0")]
-impl<T, const N: usize> DoubleEndedIterator for IntoIter<T, N>
-where
-    [T; N]: LengthAtMost32,
-{
+impl<T, const N: usize> DoubleEndedIterator for IntoIter<T, N> {
     fn next_back(&mut self) -> Option<Self::Item> {
         if self.alive.start == self.alive.end {
             return None;
@@ -182,10 +169,7 @@ where
 }
 
 #[stable(feature = "array_value_iter_impls", since = "1.40.0")]
-impl<T, const N: usize> Drop for IntoIter<T, N>
-where
-    [T; N]: LengthAtMost32,
-{
+impl<T, const N: usize> Drop for IntoIter<T, N> {
     fn drop(&mut self) {
         // SAFETY: This is safe: `as_mut_slice` returns exactly the sub-slice
         // of elements that have not been moved out yet and that remain
@@ -195,10 +179,7 @@ where
 }
 
 #[stable(feature = "array_value_iter_impls", since = "1.40.0")]
-impl<T, const N: usize> ExactSizeIterator for IntoIter<T, N>
-where
-    [T; N]: LengthAtMost32,
-{
+impl<T, const N: usize> ExactSizeIterator for IntoIter<T, N> {
     fn len(&self) -> usize {
         // Will never underflow due to the invariant `alive.start <=
         // alive.end`.
@@ -210,20 +191,17 @@ where
 }
 
 #[stable(feature = "array_value_iter_impls", since = "1.40.0")]
-impl<T, const N: usize> FusedIterator for IntoIter<T, N> where [T; N]: LengthAtMost32 {}
+impl<T, const N: usize> FusedIterator for IntoIter<T, N> {}
 
 // The iterator indeed reports the correct length. The number of "alive"
 // elements (that will still be yielded) is the length of the range `alive`.
 // This range is decremented in length in either `next` or `next_back`. It is
 // always decremented by 1 in those methods, but only if `Some(_)` is returned.
 #[stable(feature = "array_value_iter_impls", since = "1.40.0")]
-unsafe impl<T, const N: usize> TrustedLen for IntoIter<T, N> where [T; N]: LengthAtMost32 {}
+unsafe impl<T, const N: usize> TrustedLen for IntoIter<T, N> {}
 
 #[stable(feature = "array_value_iter_impls", since = "1.40.0")]
-impl<T: Clone, const N: usize> Clone for IntoIter<T, N>
-where
-    [T; N]: LengthAtMost32,
-{
+impl<T: Clone, const N: usize> Clone for IntoIter<T, N> {
     fn clone(&self) -> Self {
         // SAFETY: each point of unsafety is documented inside the unsafe block
         unsafe {
@@ -249,10 +227,7 @@ where
 }
 
 #[stable(feature = "array_value_iter_impls", since = "1.40.0")]
-impl<T: fmt::Debug, const N: usize> fmt::Debug for IntoIter<T, N>
-where
-    [T; N]: LengthAtMost32,
-{
+impl<T: fmt::Debug, const N: usize> fmt::Debug for IntoIter<T, N> {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         // Only print the elements that were not yielded yet: we cannot
         // access the yielded elements anymore.
diff --git a/src/libcore/array/mod.rs b/src/libcore/array/mod.rs
index bf4c3d8a057..c5e7f659485 100644
--- a/src/libcore/array/mod.rs
+++ b/src/libcore/array/mod.rs
@@ -125,7 +125,6 @@ impl<T, const N: usize> BorrowMut<[T]> for [T; N] {
 impl<T, const N: usize> TryFrom<&[T]> for [T; N]
 where
     T: Copy,
-    [T; N]: LengthAtMost32,
 {
     type Error = TryFromSliceError;
 
@@ -135,10 +134,7 @@ where
 }
 
 #[stable(feature = "try_from", since = "1.34.0")]
-impl<'a, T, const N: usize> TryFrom<&'a [T]> for &'a [T; N]
-where
-    [T; N]: LengthAtMost32,
-{
+impl<'a, T, const N: usize> TryFrom<&'a [T]> for &'a [T; N] {
     type Error = TryFromSliceError;
 
     fn try_from(slice: &[T]) -> Result<&[T; N], TryFromSliceError> {
@@ -153,10 +149,7 @@ where
 }
 
 #[stable(feature = "try_from", since = "1.34.0")]
-impl<'a, T, const N: usize> TryFrom<&'a mut [T]> for &'a mut [T; N]
-where
-    [T; N]: LengthAtMost32,
-{
+impl<'a, T, const N: usize> TryFrom<&'a mut [T]> for &'a mut [T; N] {
     type Error = TryFromSliceError;
 
     fn try_from(slice: &mut [T]) -> Result<&mut [T; N], TryFromSliceError> {
@@ -171,30 +164,21 @@ where
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<T: Hash, const N: usize> Hash for [T; N]
-where
-    [T; N]: LengthAtMost32,
-{
+impl<T: Hash, const N: usize> Hash for [T; N] {
     fn hash<H: hash::Hasher>(&self, state: &mut H) {
         Hash::hash(&self[..], state)
     }
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<T: fmt::Debug, const N: usize> fmt::Debug for [T; N]
-where
-    [T; N]: LengthAtMost32,
-{
+impl<T: fmt::Debug, const N: usize> fmt::Debug for [T; N] {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         fmt::Debug::fmt(&&self[..], f)
     }
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, T, const N: usize> IntoIterator for &'a [T; N]
-where
-    [T; N]: LengthAtMost32,
-{
+impl<'a, T, const N: usize> IntoIterator for &'a [T; N] {
     type Item = &'a T;
     type IntoIter = Iter<'a, T>;
 
@@ -204,10 +188,7 @@ where
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, T, const N: usize> IntoIterator for &'a mut [T; N]
-where
-    [T; N]: LengthAtMost32,
-{
+impl<'a, T, const N: usize> IntoIterator for &'a mut [T; N] {
     type Item = &'a mut T;
     type IntoIter = IterMut<'a, T>;
 
@@ -220,8 +201,6 @@ where
 impl<A, B, const N: usize> PartialEq<[B; N]> for [A; N]
 where
     A: PartialEq<B>,
-    [A; N]: LengthAtMost32,
-    [B; N]: LengthAtMost32,
 {
     #[inline]
     fn eq(&self, other: &[B; N]) -> bool {
@@ -237,7 +216,6 @@ where
 impl<A, B, const N: usize> PartialEq<[B]> for [A; N]
 where
     A: PartialEq<B>,
-    [A; N]: LengthAtMost32,
 {
     #[inline]
     fn eq(&self, other: &[B]) -> bool {
@@ -253,7 +231,6 @@ where
 impl<A, B, const N: usize> PartialEq<[A; N]> for [B]
 where
     B: PartialEq<A>,
-    [A; N]: LengthAtMost32,
 {
     #[inline]
     fn eq(&self, other: &[A; N]) -> bool {
@@ -269,7 +246,6 @@ where
 impl<'b, A, B, const N: usize> PartialEq<&'b [B]> for [A; N]
 where
     A: PartialEq<B>,
-    [A; N]: LengthAtMost32,
 {
     #[inline]
     fn eq(&self, other: &&'b [B]) -> bool {
@@ -285,7 +261,6 @@ where
 impl<'b, A, B, const N: usize> PartialEq<[A; N]> for &'b [B]
 where
     B: PartialEq<A>,
-    [A; N]: LengthAtMost32,
 {
     #[inline]
     fn eq(&self, other: &[A; N]) -> bool {
@@ -301,7 +276,6 @@ where
 impl<'b, A, B, const N: usize> PartialEq<&'b mut [B]> for [A; N]
 where
     A: PartialEq<B>,
-    [A; N]: LengthAtMost32,
 {
     #[inline]
     fn eq(&self, other: &&'b mut [B]) -> bool {
@@ -317,7 +291,6 @@ where
 impl<'b, A, B, const N: usize> PartialEq<[A; N]> for &'b mut [B]
 where
     B: PartialEq<A>,
-    [A; N]: LengthAtMost32,
 {
     #[inline]
     fn eq(&self, other: &[A; N]) -> bool {
@@ -334,13 +307,10 @@ where
 // __impl_slice_eq2! { [A; $N], &'b mut [B; $N] }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<T: Eq, const N: usize> Eq for [T; N] where [T; N]: LengthAtMost32 {}
+impl<T: Eq, const N: usize> Eq for [T; N] {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<T: PartialOrd, const N: usize> PartialOrd for [T; N]
-where
-    [T; N]: LengthAtMost32,
-{
+impl<T: PartialOrd, const N: usize> PartialOrd for [T; N] {
     #[inline]
     fn partial_cmp(&self, other: &[T; N]) -> Option<Ordering> {
         PartialOrd::partial_cmp(&&self[..], &&other[..])
@@ -365,10 +335,7 @@ where
 
 /// Implements comparison of arrays lexicographically.
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<T: Ord, const N: usize> Ord for [T; N]
-where
-    [T; N]: LengthAtMost32,
-{
+impl<T: Ord, const N: usize> Ord for [T; N] {
     #[inline]
     fn cmp(&self, other: &[T; N]) -> Ordering {
         Ord::cmp(&&self[..], &&other[..])
diff --git a/src/test/ui/const-generics/array-impls/alloc-traits-impls-length-33.rs b/src/test/ui/const-generics/array-impls/alloc-traits-impls-length-33.rs
new file mode 100644
index 00000000000..35df3278a6e
--- /dev/null
+++ b/src/test/ui/const-generics/array-impls/alloc-traits-impls-length-33.rs
@@ -0,0 +1,40 @@
+// check-pass
+
+pub fn yes_vec_partial_eq_array<A, B>() -> impl PartialEq<[B; 33]>
+where
+    A: PartialEq<B>,
+{
+    Vec::<A>::new()
+}
+
+pub fn yes_vec_partial_eq_ref_array<'a, A, B>() -> impl PartialEq<&'a [B; 33]>
+where
+    A: PartialEq<B>,
+{
+    Vec::<A>::new()
+}
+
+use std::collections::VecDeque;
+
+pub fn yes_vecdeque_partial_eq_array<A, B>() -> impl PartialEq<[B; 33]>
+where
+    A: PartialEq<B>,
+{
+    VecDeque::<A>::new()
+}
+
+pub fn yes_vecdeque_partial_eq_ref_array<'a, A, B>() -> impl PartialEq<&'a [B; 33]>
+where
+    A: PartialEq<B>,
+{
+    VecDeque::<A>::new()
+}
+
+pub fn yes_vecdeque_partial_eq_ref_mut_array<'a, A, B>() -> impl PartialEq<&'a mut [B; 33]>
+where
+    A: PartialEq<B>,
+{
+    VecDeque::<A>::new()
+}
+
+fn main() {}
diff --git a/src/test/ui/const-generics/array-impls/alloc-traits-no-impls-length-33.rs b/src/test/ui/const-generics/array-impls/alloc-traits-no-impls-length-33.rs
deleted file mode 100644
index 19107e6bf16..00000000000
--- a/src/test/ui/const-generics/array-impls/alloc-traits-no-impls-length-33.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-pub fn no_vec_partial_eq_array<A, B>() -> impl PartialEq<[B; 33]>
-//~^ ERROR arrays only have std trait implementations for lengths 0..=32
-where
-    A: PartialEq<B>,
-{
-    Vec::<A>::new()
-}
-
-pub fn no_vec_partial_eq_ref_array<'a, A, B>() -> impl PartialEq<&'a [B; 33]>
-//~^ ERROR arrays only have std trait implementations for lengths 0..=32
-where
-    A: PartialEq<B>,
-{
-    Vec::<A>::new()
-}
-
-use std::collections::VecDeque;
-
-pub fn no_vecdeque_partial_eq_array<A, B>() -> impl PartialEq<[B; 33]>
-//~^ ERROR arrays only have std trait implementations for lengths 0..=32
-where
-    A: PartialEq<B>,
-{
-    VecDeque::<A>::new()
-}
-
-pub fn no_vecdeque_partial_eq_ref_array<'a, A, B>() -> impl PartialEq<&'a [B; 33]>
-//~^ ERROR arrays only have std trait implementations for lengths 0..=32
-where
-    A: PartialEq<B>,
-{
-    VecDeque::<A>::new()
-}
-
-pub fn no_vecdeque_partial_eq_ref_mut_array<'a, A, B>() -> impl PartialEq<&'a mut [B; 33]>
-//~^ ERROR arrays only have std trait implementations for lengths 0..=32
-where
-    A: PartialEq<B>,
-{
-    VecDeque::<A>::new()
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/array-impls/alloc-traits-no-impls-length-33.stderr b/src/test/ui/const-generics/array-impls/alloc-traits-no-impls-length-33.stderr
deleted file mode 100644
index 6e5afcdb8bb..00000000000
--- a/src/test/ui/const-generics/array-impls/alloc-traits-no-impls-length-33.stderr
+++ /dev/null
@@ -1,63 +0,0 @@
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/alloc-traits-no-impls-length-33.rs:1:43
-   |
-LL | pub fn no_vec_partial_eq_array<A, B>() -> impl PartialEq<[B; 33]>
-   |                                           ^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[B; 33]`
-...
-LL |     Vec::<A>::new()
-   |     --------------- this returned value is of type `std::vec::Vec<A>`
-   |
-   = note: required because of the requirements on the impl of `std::cmp::PartialEq<[B; 33]>` for `std::vec::Vec<A>`
-   = note: the return type of a function must have a statically known size
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/alloc-traits-no-impls-length-33.rs:9:51
-   |
-LL | pub fn no_vec_partial_eq_ref_array<'a, A, B>() -> impl PartialEq<&'a [B; 33]>
-   |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[B; 33]`
-...
-LL |     Vec::<A>::new()
-   |     --------------- this returned value is of type `std::vec::Vec<A>`
-   |
-   = note: required because of the requirements on the impl of `std::cmp::PartialEq<&'a [B; 33]>` for `std::vec::Vec<A>`
-   = note: the return type of a function must have a statically known size
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/alloc-traits-no-impls-length-33.rs:19:48
-   |
-LL | pub fn no_vecdeque_partial_eq_array<A, B>() -> impl PartialEq<[B; 33]>
-   |                                                ^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[B; 33]`
-...
-LL |     VecDeque::<A>::new()
-   |     -------------------- this returned value is of type `std::collections::VecDeque<A>`
-   |
-   = note: required because of the requirements on the impl of `std::cmp::PartialEq<[B; 33]>` for `std::collections::VecDeque<A>`
-   = note: the return type of a function must have a statically known size
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/alloc-traits-no-impls-length-33.rs:27:56
-   |
-LL | pub fn no_vecdeque_partial_eq_ref_array<'a, A, B>() -> impl PartialEq<&'a [B; 33]>
-   |                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[B; 33]`
-...
-LL |     VecDeque::<A>::new()
-   |     -------------------- this returned value is of type `std::collections::VecDeque<A>`
-   |
-   = note: required because of the requirements on the impl of `std::cmp::PartialEq<&'a [B; 33]>` for `std::collections::VecDeque<A>`
-   = note: the return type of a function must have a statically known size
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/alloc-traits-no-impls-length-33.rs:35:60
-   |
-LL | pub fn no_vecdeque_partial_eq_ref_mut_array<'a, A, B>() -> impl PartialEq<&'a mut [B; 33]>
-   |                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[B; 33]`
-...
-LL |     VecDeque::<A>::new()
-   |     -------------------- this returned value is of type `std::collections::VecDeque<A>`
-   |
-   = note: required because of the requirements on the impl of `std::cmp::PartialEq<&'a mut [B; 33]>` for `std::collections::VecDeque<A>`
-   = note: the return type of a function must have a statically known size
-
-error: aborting due to 5 previous errors
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/const-generics/array-impls/alloc-types-impls-length-33.rs b/src/test/ui/const-generics/array-impls/alloc-types-impls-length-33.rs
new file mode 100644
index 00000000000..294b405e0ed
--- /dev/null
+++ b/src/test/ui/const-generics/array-impls/alloc-types-impls-length-33.rs
@@ -0,0 +1,25 @@
+// check-pass
+
+use std::{convert::TryFrom, rc::Rc, sync::Arc};
+
+pub fn yes_vec() {
+    let v: Vec<_> = [0; 33].into();
+}
+
+pub fn yes_box() {
+    let boxed_slice = Box::new([0; 33]) as Box<[i32]>;
+    let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice);
+    let boxed_slice = <Box<[i32]>>::from([0; 33]);
+}
+
+pub fn yes_rc() {
+    let boxed_slice = Rc::new([0; 33]) as Rc<[i32]>;
+    let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice);
+}
+
+pub fn yes_arc() {
+    let boxed_slice = Arc::new([0; 33]) as Arc<[i32]>;
+    let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice);
+}
+
+fn main() {}
diff --git a/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs b/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs
deleted file mode 100644
index 48cf21d489a..00000000000
--- a/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// ignore-tidy-linelength
-
-use std::{convert::TryFrom, rc::Rc, sync::Arc};
-
-pub fn no_vec() {
-    let v: Vec<_> = [0; 33].into();
-    //~^ ERROR arrays only have std trait implementations for lengths 0..=32
-}
-
-pub fn no_box() {
-    let boxed_slice = Box::new([0; 33]) as Box<[i32]>;
-    let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice);
-    //~^ ERROR the trait bound `std::boxed::Box<[i32; 33]>: std::convert::From<std::boxed::Box<[i32]>>` is not satisfied
-    //~^^ ERROR the trait bound `std::boxed::Box<[i32; 33]>: std::convert::TryFrom<std::boxed::Box<[i32]>>` is not satisfied
-    let boxed_slice = <Box<[i32]>>::from([0; 33]);
-    //~^ 15:42: 15:49: arrays only have std trait implementations for lengths 0..=32 [E0277]
-}
-
-pub fn no_rc() {
-    let boxed_slice = Rc::new([0; 33]) as Rc<[i32]>;
-    let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice);
-    //~^ ERROR the trait bound `std::rc::Rc<[i32; 33]>: std::convert::From<std::rc::Rc<[i32]>>` is not satisfied
-    //~^^ ERROR the trait bound `std::rc::Rc<[i32; 33]>: std::convert::TryFrom<std::rc::Rc<[i32]>>` is not satisfied
-}
-
-pub fn no_arc() {
-    let boxed_slice = Arc::new([0; 33]) as Arc<[i32]>;
-    let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice);
-    //~^ ERROR the trait bound `std::sync::Arc<[i32; 33]>: std::convert::From<std::sync::Arc<[i32]>>` is not satisfied
-    //~^^ ERROR the trait bound `std::sync::Arc<[i32; 33]>: std::convert::TryFrom<std::sync::Arc<[i32]>>` is not satisfied
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.stderr b/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.stderr
deleted file mode 100644
index 5c01603ab88..00000000000
--- a/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.stderr
+++ /dev/null
@@ -1,97 +0,0 @@
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/alloc-types-no-impls-length-33.rs:6:29
-   |
-LL |     let v: Vec<_> = [0; 33].into();
-   |                             ^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[{integer}; 33]`
-   |
-   = note: required because of the requirements on the impl of `std::convert::From<[{integer}; 33]>` for `std::vec::Vec<{integer}>`
-   = note: required because of the requirements on the impl of `std::convert::Into<std::vec::Vec<{integer}>>` for `[{integer}; 33]`
-
-error[E0277]: the trait bound `std::boxed::Box<[i32; 33]>: std::convert::From<std::boxed::Box<[i32]>>` is not satisfied
-  --> $DIR/alloc-types-no-impls-length-33.rs:12:23
-   |
-LL |     let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice);
-   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::boxed::Box<[i32]>>` is not implemented for `std::boxed::Box<[i32; 33]>`
-   |
-   = help: the following implementations were found:
-             <std::boxed::Box<(dyn std::error::Error + 'a)> as std::convert::From<E>>
-             <std::boxed::Box<(dyn std::error::Error + 'static)> as std::convert::From<&str>>
-             <std::boxed::Box<(dyn std::error::Error + 'static)> as std::convert::From<std::borrow::Cow<'a, str>>>
-             <std::boxed::Box<(dyn std::error::Error + 'static)> as std::convert::From<std::string::String>>
-           and 22 others
-   = note: required because of the requirements on the impl of `std::convert::Into<std::boxed::Box<[i32; 33]>>` for `std::boxed::Box<[i32]>`
-   = note: required because of the requirements on the impl of `std::convert::TryFrom<std::boxed::Box<[i32]>>` for `std::boxed::Box<[i32; 33]>`
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/alloc-types-no-impls-length-33.rs:15:42
-   |
-LL |     let boxed_slice = <Box<[i32]>>::from([0; 33]);
-   |                                          ^^^^^^^
-   |                                          |
-   |                                          expected an implementor of trait `std::convert::From<[{integer}; 33]>`
-   |                                          help: consider borrowing here: `&[0; 33]`
-   |
-   = note: the trait bound `[i32; 33]: std::convert::From<[{integer}; 33]>` is not satisfied
-   = note: required because of the requirements on the impl of `std::convert::From<[i32; 33]>` for `std::boxed::Box<[i32]>`
-   = note: required by `std::convert::From::from`
-
-error[E0277]: the trait bound `std::boxed::Box<[i32; 33]>: std::convert::TryFrom<std::boxed::Box<[i32]>>` is not satisfied
-  --> $DIR/alloc-types-no-impls-length-33.rs:12:23
-   |
-LL |     let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice);
-   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::boxed::Box<[i32]>>` is not implemented for `std::boxed::Box<[i32; 33]>`
-   |
-   = help: the following implementations were found:
-             <std::boxed::Box<[T; N]> as std::convert::TryFrom<std::boxed::Box<[T]>>>
-
-error[E0277]: the trait bound `std::rc::Rc<[i32; 33]>: std::convert::From<std::rc::Rc<[i32]>>` is not satisfied
-  --> $DIR/alloc-types-no-impls-length-33.rs:21:23
-   |
-LL |     let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice);
-   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::rc::Rc<[i32]>>` is not implemented for `std::rc::Rc<[i32; 33]>`
-   |
-   = help: the following implementations were found:
-             <std::rc::Rc<B> as std::convert::From<std::borrow::Cow<'a, B>>>
-             <std::rc::Rc<T> as std::convert::From<T>>
-             <std::rc::Rc<T> as std::convert::From<std::boxed::Box<T>>>
-             <std::rc::Rc<[T]> as std::convert::From<&[T]>>
-           and 9 others
-   = note: required because of the requirements on the impl of `std::convert::Into<std::rc::Rc<[i32; 33]>>` for `std::rc::Rc<[i32]>`
-   = note: required because of the requirements on the impl of `std::convert::TryFrom<std::rc::Rc<[i32]>>` for `std::rc::Rc<[i32; 33]>`
-
-error[E0277]: the trait bound `std::rc::Rc<[i32; 33]>: std::convert::TryFrom<std::rc::Rc<[i32]>>` is not satisfied
-  --> $DIR/alloc-types-no-impls-length-33.rs:21:23
-   |
-LL |     let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice);
-   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::rc::Rc<[i32]>>` is not implemented for `std::rc::Rc<[i32; 33]>`
-   |
-   = help: the following implementations were found:
-             <std::rc::Rc<[T; N]> as std::convert::TryFrom<std::rc::Rc<[T]>>>
-
-error[E0277]: the trait bound `std::sync::Arc<[i32; 33]>: std::convert::From<std::sync::Arc<[i32]>>` is not satisfied
-  --> $DIR/alloc-types-no-impls-length-33.rs:28:23
-   |
-LL |     let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice);
-   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::sync::Arc<[i32]>>` is not implemented for `std::sync::Arc<[i32; 33]>`
-   |
-   = help: the following implementations were found:
-             <std::sync::Arc<B> as std::convert::From<std::borrow::Cow<'a, B>>>
-             <std::sync::Arc<T> as std::convert::From<T>>
-             <std::sync::Arc<T> as std::convert::From<std::boxed::Box<T>>>
-             <std::sync::Arc<[T]> as std::convert::From<&[T]>>
-           and 9 others
-   = note: required because of the requirements on the impl of `std::convert::Into<std::sync::Arc<[i32; 33]>>` for `std::sync::Arc<[i32]>`
-   = note: required because of the requirements on the impl of `std::convert::TryFrom<std::sync::Arc<[i32]>>` for `std::sync::Arc<[i32; 33]>`
-
-error[E0277]: the trait bound `std::sync::Arc<[i32; 33]>: std::convert::TryFrom<std::sync::Arc<[i32]>>` is not satisfied
-  --> $DIR/alloc-types-no-impls-length-33.rs:28:23
-   |
-LL |     let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice);
-   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::sync::Arc<[i32]>>` is not implemented for `std::sync::Arc<[i32; 33]>`
-   |
-   = help: the following implementations were found:
-             <std::sync::Arc<[T; N]> as std::convert::TryFrom<std::sync::Arc<[T]>>>
-
-error: aborting due to 8 previous errors
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/const-generics/array-impls/core-traits-impls-length-33.rs b/src/test/ui/const-generics/array-impls/core-traits-impls-length-33.rs
new file mode 100644
index 00000000000..c609a7c6f92
--- /dev/null
+++ b/src/test/ui/const-generics/array-impls/core-traits-impls-length-33.rs
@@ -0,0 +1,66 @@
+// check-pass
+
+pub fn yes_as_ref() -> impl AsRef<[u8]> {
+    [0; 33]
+}
+
+pub fn yes_as_mut() -> impl AsMut<[u8]> {
+    [0; 33]
+}
+
+pub fn yes_borrow() -> impl std::borrow::Borrow<[u8]> {
+    [0; 33]
+}
+
+pub fn yes_borrow_mut() -> impl std::borrow::BorrowMut<[u8]> {
+    [0; 33]
+}
+
+pub fn yes_try_from_slice() -> impl std::convert::TryFrom<&'static [u8]> {
+    [0; 33]
+}
+
+pub fn yes_ref_try_from_slice() -> impl std::convert::TryFrom<&'static [u8]> {
+    let a: &'static _ = &[0; 33];
+    a
+}
+
+pub fn yes_hash() -> impl std::hash::Hash {
+    [0; 33]
+}
+
+pub fn yes_debug() -> impl std::fmt::Debug {
+    [0; 33]
+}
+
+pub fn yes_ref_into_iterator() -> impl IntoIterator<Item=&'static u8> {
+    let a: &'static _ = &[0; 33];
+    a
+}
+
+pub fn yes_partial_eq() -> impl PartialEq<[u8; 33]> {
+    [0; 33]
+}
+
+pub fn yes_partial_eq_slice() -> impl PartialEq<[u8]> {
+    [0; 33]
+}
+
+pub fn yes_slice_partial_eq() -> impl PartialEq<[u8; 33]> {
+    let a: &'static _ = &[0; 33];
+    &a[..]
+}
+
+pub fn yes_eq() -> impl Eq {
+    [0; 33]
+}
+
+pub fn yes_partial_ord() -> impl PartialOrd<[u8; 33]> {
+    [0; 33]
+}
+
+pub fn yes_ord() -> impl Ord {
+    [0; 33]
+}
+
+fn main() {}
diff --git a/src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.rs b/src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.rs
deleted file mode 100644
index 8397d204f35..00000000000
--- a/src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-pub fn no_debug() {
-    println!("{:?}", [0_usize; 33]);
-    //~^ ERROR arrays only have std trait implementations for lengths 0..=32
-}
-
-pub fn no_hash() {
-    use std::collections::HashSet;
-    let mut set = HashSet::new();
-    set.insert([0_usize; 33]);
-    //~^ ERROR arrays only have std trait implementations for lengths 0..=32
-}
-
-pub fn no_partial_eq() -> bool {
-    [0_usize; 33] == [1_usize; 33]
-    //~^ ERROR binary operation `==` cannot be applied to type `[usize; 33]`
-}
-
-pub fn no_partial_ord() -> bool {
-    [0_usize; 33] < [1_usize; 33]
-    //~^ ERROR binary operation `<` cannot be applied to type `[usize; 33]`
-}
-
-pub fn no_into_iterator() {
-    for _ in &[0_usize; 33] {
-        //~^ ERROR the trait bound `&[usize; 33]: std::iter::IntoIterator` is not satisfied
-    }
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.stderr b/src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.stderr
deleted file mode 100644
index 76ccc48c32a..00000000000
--- a/src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.stderr
+++ /dev/null
@@ -1,51 +0,0 @@
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/core-traits-no-impls-length-33.rs:2:22
-   |
-LL |     println!("{:?}", [0_usize; 33]);
-   |                      ^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[usize; 33]`
-   |
-   = note: required because of the requirements on the impl of `std::fmt::Debug` for `[usize; 33]`
-   = note: required by `std::fmt::Debug::fmt`
-   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/core-traits-no-impls-length-33.rs:9:16
-   |
-LL |     set.insert([0_usize; 33]);
-   |                ^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[usize; 33]`
-   |
-   = note: required because of the requirements on the impl of `std::cmp::Eq` for `[usize; 33]`
-
-error[E0369]: binary operation `==` cannot be applied to type `[usize; 33]`
-  --> $DIR/core-traits-no-impls-length-33.rs:14:19
-   |
-LL |     [0_usize; 33] == [1_usize; 33]
-   |     ------------- ^^ ------------- [usize; 33]
-   |     |
-   |     [usize; 33]
-
-error[E0369]: binary operation `<` cannot be applied to type `[usize; 33]`
-  --> $DIR/core-traits-no-impls-length-33.rs:19:19
-   |
-LL |     [0_usize; 33] < [1_usize; 33]
-   |     ------------- ^ ------------- [usize; 33]
-   |     |
-   |     [usize; 33]
-
-error[E0277]: the trait bound `&[usize; 33]: std::iter::IntoIterator` is not satisfied
-  --> $DIR/core-traits-no-impls-length-33.rs:24:14
-   |
-LL |     for _ in &[0_usize; 33] {
-   |              ^^^^^^^^^^^^^^ the trait `std::iter::IntoIterator` is not implemented for `&[usize; 33]`
-   |
-   = help: the following implementations were found:
-             <&'a [T; N] as std::iter::IntoIterator>
-             <&'a [T] as std::iter::IntoIterator>
-             <&'a mut [T; N] as std::iter::IntoIterator>
-             <&'a mut [T] as std::iter::IntoIterator>
-   = note: required by `std::iter::IntoIterator::into_iter`
-
-error: aborting due to 5 previous errors
-
-Some errors have detailed explanations: E0277, E0369.
-For more information about an error, try `rustc --explain E0277`.
diff --git a/src/test/ui/const-generics/array-impls/into-iter-impls-length-33.rs b/src/test/ui/const-generics/array-impls/into-iter-impls-length-33.rs
new file mode 100644
index 00000000000..0aeba8607e8
--- /dev/null
+++ b/src/test/ui/const-generics/array-impls/into-iter-impls-length-33.rs
@@ -0,0 +1,41 @@
+// check-pass
+
+#![feature(array_value_iter)]
+#![feature(trusted_len)]
+
+use std::{
+    array::IntoIter,
+    fmt::Debug,
+    iter::{ExactSizeIterator, FusedIterator, TrustedLen},
+};
+
+pub fn yes_iterator() -> impl Iterator<Item = i32> {
+    IntoIter::new([0i32; 32])
+}
+
+pub fn yes_double_ended_iterator() -> impl DoubleEndedIterator {
+    IntoIter::new([0i32; 32])
+}
+
+pub fn yes_exact_size_iterator() -> impl ExactSizeIterator {
+    IntoIter::new([0i32; 32])
+}
+
+pub fn yes_fused_iterator() -> impl FusedIterator {
+    IntoIter::new([0i32; 32])
+}
+
+pub fn yes_trusted_len() -> impl TrustedLen {
+    IntoIter::new([0i32; 32])
+}
+
+pub fn yes_clone() -> impl Clone {
+    IntoIter::new([0i32; 32])
+}
+
+pub fn yes_debug() -> impl Debug {
+    IntoIter::new([0i32; 32])
+}
+
+
+fn main() {}
diff --git a/src/test/ui/const-generics/array-impls/into-iter-no-impls-length-33.rs b/src/test/ui/const-generics/array-impls/into-iter-no-impls-length-33.rs
deleted file mode 100644
index a0bbd2ce64a..00000000000
--- a/src/test/ui/const-generics/array-impls/into-iter-no-impls-length-33.rs
+++ /dev/null
@@ -1,53 +0,0 @@
-#![feature(array_value_iter)]
-#![feature(trusted_len)]
-
-use std::{
-    array::IntoIter,
-    fmt::Debug,
-    iter::{ExactSizeIterator, FusedIterator, TrustedLen},
-};
-
-pub fn no_iterator() -> impl Iterator<Item = i32> {
-    //~^ ERROR arrays only have std trait implementations for lengths 0..=32
-    IntoIter::new([0i32; 33])
-    //~^ ERROR arrays only have std trait implementations for lengths 0..=32
-}
-
-pub fn no_double_ended_iterator() -> impl DoubleEndedIterator {
-    //~^ ERROR arrays only have std trait implementations for lengths 0..=32
-    IntoIter::new([0i32; 33])
-    //~^ ERROR arrays only have std trait implementations for lengths 0..=32
-}
-
-pub fn no_exact_size_iterator() -> impl ExactSizeIterator {
-    //~^ ERROR arrays only have std trait implementations for lengths 0..=32
-    IntoIter::new([0i32; 33])
-    //~^ ERROR arrays only have std trait implementations for lengths 0..=32
-}
-
-pub fn no_fused_iterator() -> impl FusedIterator {
-    //~^ ERROR arrays only have std trait implementations for lengths 0..=32
-    IntoIter::new([0i32; 33])
-    //~^ ERROR arrays only have std trait implementations for lengths 0..=32
-}
-
-pub fn no_trusted_len() -> impl TrustedLen {
-    //~^ ERROR arrays only have std trait implementations for lengths 0..=32
-    IntoIter::new([0i32; 33])
-    //~^ ERROR arrays only have std trait implementations for lengths 0..=32
-}
-
-pub fn no_clone() -> impl Clone {
-    //~^ ERROR arrays only have std trait implementations for lengths 0..=32
-    IntoIter::new([0i32; 33])
-    //~^ ERROR arrays only have std trait implementations for lengths 0..=32
-}
-
-pub fn no_debug() -> impl Debug {
-    //~^ ERROR arrays only have std trait implementations for lengths 0..=32
-    IntoIter::new([0i32; 33])
-    //~^ ERROR arrays only have std trait implementations for lengths 0..=32
-}
-
-
-fn main() {}
diff --git a/src/test/ui/const-generics/array-impls/into-iter-no-impls-length-33.stderr b/src/test/ui/const-generics/array-impls/into-iter-no-impls-length-33.stderr
deleted file mode 100644
index ceda31550ff..00000000000
--- a/src/test/ui/const-generics/array-impls/into-iter-no-impls-length-33.stderr
+++ /dev/null
@@ -1,143 +0,0 @@
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/into-iter-no-impls-length-33.rs:12:19
-   |
-LL |     IntoIter::new([0i32; 33])
-   |                   ^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i32; 33]`
-   |
-   = note: required by `std::array::IntoIter::<T, N>::new`
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/into-iter-no-impls-length-33.rs:10:25
-   |
-LL | pub fn no_iterator() -> impl Iterator<Item = i32> {
-   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i32; 33]`
-LL |
-LL |     IntoIter::new([0i32; 33])
-   |     ------------------------- this returned value is of type `std::array::IntoIter<i32, 33_usize>`
-   |
-   = note: required because of the requirements on the impl of `std::iter::Iterator` for `std::array::IntoIter<i32, 33_usize>`
-   = note: the return type of a function must have a statically known size
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/into-iter-no-impls-length-33.rs:18:19
-   |
-LL |     IntoIter::new([0i32; 33])
-   |                   ^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i32; 33]`
-   |
-   = note: required by `std::array::IntoIter::<T, N>::new`
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/into-iter-no-impls-length-33.rs:16:38
-   |
-LL | pub fn no_double_ended_iterator() -> impl DoubleEndedIterator {
-   |                                      ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i32; 33]`
-LL |
-LL |     IntoIter::new([0i32; 33])
-   |     ------------------------- this returned value is of type `std::array::IntoIter<i32, 33_usize>`
-   |
-   = note: required because of the requirements on the impl of `std::iter::DoubleEndedIterator` for `std::array::IntoIter<i32, 33_usize>`
-   = note: the return type of a function must have a statically known size
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/into-iter-no-impls-length-33.rs:24:19
-   |
-LL |     IntoIter::new([0i32; 33])
-   |                   ^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i32; 33]`
-   |
-   = note: required by `std::array::IntoIter::<T, N>::new`
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/into-iter-no-impls-length-33.rs:22:36
-   |
-LL | pub fn no_exact_size_iterator() -> impl ExactSizeIterator {
-   |                                    ^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i32; 33]`
-LL |
-LL |     IntoIter::new([0i32; 33])
-   |     ------------------------- this returned value is of type `std::array::IntoIter<i32, 33_usize>`
-   |
-   = note: required because of the requirements on the impl of `std::iter::ExactSizeIterator` for `std::array::IntoIter<i32, 33_usize>`
-   = note: the return type of a function must have a statically known size
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/into-iter-no-impls-length-33.rs:30:19
-   |
-LL |     IntoIter::new([0i32; 33])
-   |                   ^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i32; 33]`
-   |
-   = note: required by `std::array::IntoIter::<T, N>::new`
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/into-iter-no-impls-length-33.rs:28:31
-   |
-LL | pub fn no_fused_iterator() -> impl FusedIterator {
-   |                               ^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i32; 33]`
-LL |
-LL |     IntoIter::new([0i32; 33])
-   |     ------------------------- this returned value is of type `std::array::IntoIter<i32, 33_usize>`
-   |
-   = note: required because of the requirements on the impl of `std::iter::FusedIterator` for `std::array::IntoIter<i32, 33_usize>`
-   = note: the return type of a function must have a statically known size
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/into-iter-no-impls-length-33.rs:36:19
-   |
-LL |     IntoIter::new([0i32; 33])
-   |                   ^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i32; 33]`
-   |
-   = note: required by `std::array::IntoIter::<T, N>::new`
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/into-iter-no-impls-length-33.rs:34:28
-   |
-LL | pub fn no_trusted_len() -> impl TrustedLen {
-   |                            ^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i32; 33]`
-LL |
-LL |     IntoIter::new([0i32; 33])
-   |     ------------------------- this returned value is of type `std::array::IntoIter<i32, 33_usize>`
-   |
-   = note: required because of the requirements on the impl of `std::iter::TrustedLen` for `std::array::IntoIter<i32, 33_usize>`
-   = note: the return type of a function must have a statically known size
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/into-iter-no-impls-length-33.rs:42:19
-   |
-LL |     IntoIter::new([0i32; 33])
-   |                   ^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i32; 33]`
-   |
-   = note: required by `std::array::IntoIter::<T, N>::new`
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/into-iter-no-impls-length-33.rs:40:22
-   |
-LL | pub fn no_clone() -> impl Clone {
-   |                      ^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i32; 33]`
-LL |
-LL |     IntoIter::new([0i32; 33])
-   |     ------------------------- this returned value is of type `std::array::IntoIter<i32, 33_usize>`
-   |
-   = note: required because of the requirements on the impl of `std::clone::Clone` for `std::array::IntoIter<i32, 33_usize>`
-   = note: the return type of a function must have a statically known size
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/into-iter-no-impls-length-33.rs:48:19
-   |
-LL |     IntoIter::new([0i32; 33])
-   |                   ^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i32; 33]`
-   |
-   = note: required by `std::array::IntoIter::<T, N>::new`
-
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/into-iter-no-impls-length-33.rs:46:22
-   |
-LL | pub fn no_debug() -> impl Debug {
-   |                      ^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i32; 33]`
-LL |
-LL |     IntoIter::new([0i32; 33])
-   |     ------------------------- this returned value is of type `std::array::IntoIter<i32, 33_usize>`
-   |
-   = note: required because of the requirements on the impl of `std::fmt::Debug` for `std::array::IntoIter<i32, 33_usize>`
-   = note: the return type of a function must have a statically known size
-
-error: aborting due to 14 previous errors
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/const-generics/broken-mir-2.rs b/src/test/ui/const-generics/broken-mir-2.rs
index c2f9b786f8f..2cd035639ee 100644
--- a/src/test/ui/const-generics/broken-mir-2.rs
+++ b/src/test/ui/const-generics/broken-mir-2.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![feature(const_generics)]
 //~^ WARN the feature `const_generics` is incomplete
 
@@ -5,6 +7,5 @@ use std::fmt::Debug;
 
 #[derive(Debug)]
 struct S<T: Debug, const N: usize>([T; N]);
-//~^ ERROR arrays only have std trait implementations for lengths 0..=32
 
 fn main() {}
diff --git a/src/test/ui/const-generics/broken-mir-2.stderr b/src/test/ui/const-generics/broken-mir-2.stderr
index 05552027f13..c36ef845097 100644
--- a/src/test/ui/const-generics/broken-mir-2.stderr
+++ b/src/test/ui/const-generics/broken-mir-2.stderr
@@ -1,5 +1,5 @@
 warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/broken-mir-2.rs:1:12
+  --> $DIR/broken-mir-2.rs:3:12
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
@@ -7,17 +7,5 @@ LL | #![feature(const_generics)]
    = note: `#[warn(incomplete_features)]` on by default
    = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
 
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/broken-mir-2.rs:7:36
-   |
-LL | struct S<T: Debug, const N: usize>([T; N]);
-   |                                    ^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[T; N]`
-   |
-   = note: required because of the requirements on the impl of `std::fmt::Debug` for `[T; N]`
-   = note: required because of the requirements on the impl of `std::fmt::Debug` for `&[T; N]`
-   = note: required for the cast to the object type `dyn std::fmt::Debug`
-   = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to previous error; 1 warning emitted
+warning: 1 warning emitted
 
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/const-generics/derive-debug-array-wrapper.rs b/src/test/ui/const-generics/derive-debug-array-wrapper.rs
index c6d8b32f276..36272ae8619 100644
--- a/src/test/ui/const-generics/derive-debug-array-wrapper.rs
+++ b/src/test/ui/const-generics/derive-debug-array-wrapper.rs
@@ -1,9 +1,11 @@
+// run-pass
+
 #![feature(const_generics)]
 //~^ WARN the feature `const_generics` is incomplete
 
 #[derive(Debug)]
 struct X<const N: usize> {
-    a: [u32; N], //~ ERROR arrays only have std trait implementations for lengths 0..=32
+    a: [u32; N],
 }
 
 fn main() {}
diff --git a/src/test/ui/const-generics/derive-debug-array-wrapper.stderr b/src/test/ui/const-generics/derive-debug-array-wrapper.stderr
index a0abbd16894..8f7ab822554 100644
--- a/src/test/ui/const-generics/derive-debug-array-wrapper.stderr
+++ b/src/test/ui/const-generics/derive-debug-array-wrapper.stderr
@@ -1,5 +1,5 @@
 warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/derive-debug-array-wrapper.rs:1:12
+  --> $DIR/derive-debug-array-wrapper.rs:3:12
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
@@ -7,17 +7,5 @@ LL | #![feature(const_generics)]
    = note: `#[warn(incomplete_features)]` on by default
    = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
 
-error[E0277]: arrays only have std trait implementations for lengths 0..=32
-  --> $DIR/derive-debug-array-wrapper.rs:6:5
-   |
-LL |     a: [u32; N],
-   |     ^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[u32; N]`
-   |
-   = note: required because of the requirements on the impl of `std::fmt::Debug` for `[u32; N]`
-   = note: required because of the requirements on the impl of `std::fmt::Debug` for `&[u32; N]`
-   = note: required for the cast to the object type `dyn std::fmt::Debug`
-   = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to previous error; 1 warning emitted
+warning: 1 warning emitted
 
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/consts/too_generic_eval_ice.rs b/src/test/ui/consts/too_generic_eval_ice.rs
index 3ea5f88f07d..af494e37349 100644
--- a/src/test/ui/consts/too_generic_eval_ice.rs
+++ b/src/test/ui/consts/too_generic_eval_ice.rs
@@ -6,7 +6,8 @@ impl<A, B> Foo<A, B> {
     pub fn crash() -> bool {
         [5; Self::HOST_SIZE] == [6; 0]
         //~^ ERROR constant expression depends on a generic parameter
-        //~| ERROR binary operation `==` cannot be applied to type `[{integer}; _]`
+        //~| ERROR constant expression depends on a generic parameter
+        //~| ERROR can't compare `[{integer}; _]` with `[{integer}; 0]`
     }
 }
 
diff --git a/src/test/ui/consts/too_generic_eval_ice.stderr b/src/test/ui/consts/too_generic_eval_ice.stderr
index 8b29c533bcc..d5816fbb8e4 100644
--- a/src/test/ui/consts/too_generic_eval_ice.stderr
+++ b/src/test/ui/consts/too_generic_eval_ice.stderr
@@ -6,14 +6,22 @@ LL |         [5; Self::HOST_SIZE] == [6; 0]
    |
    = note: this may fail depending on what value the parameter takes
 
-error[E0369]: binary operation `==` cannot be applied to type `[{integer}; _]`
+error: constant expression depends on a generic parameter
+  --> $DIR/too_generic_eval_ice.rs:7:30
+   |
+LL |         [5; Self::HOST_SIZE] == [6; 0]
+   |                              ^^
+   |
+   = note: this may fail depending on what value the parameter takes
+
+error[E0277]: can't compare `[{integer}; _]` with `[{integer}; 0]`
   --> $DIR/too_generic_eval_ice.rs:7:30
    |
 LL |         [5; Self::HOST_SIZE] == [6; 0]
-   |         -------------------- ^^ ------ [{integer}; 0]
-   |         |
-   |         [{integer}; _]
+   |                              ^^ no implementation for `[{integer}; _] == [{integer}; 0]`
+   |
+   = help: the trait `std::cmp::PartialEq<[{integer}; 0]>` is not implemented for `[{integer}; _]`
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
-For more information about this error, try `rustc --explain E0369`.
+For more information about this error, try `rustc --explain E0277`.
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 c1aa3d70f77..561376c8f05 100644
--- a/src/test/ui/iterators/into-iter-on-arrays-lint.fixed
+++ b/src/test/ui/iterators/into-iter-on-arrays-lint.fixed
@@ -13,10 +13,10 @@ fn main() {
     //~^ 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
     big.iter();
-    //~^ WARNING this method call currently resolves to `<&[T] as IntoIterator>::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
     [0u8; 33].iter();
-    //~^ WARNING this method call currently resolves to `<&[T] as IntoIterator>::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(small).iter();
@@ -26,10 +26,10 @@ fn main() {
     //~^ 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 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([0u8; 33]).iter();
-    //~^ WARNING this method call currently resolves to `<&[T] as IntoIterator>::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(small)).iter();
@@ -39,10 +39,10 @@ fn main() {
     //~^ 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 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([0u8; 33])).iter();
-    //~^ WARNING this method call currently resolves to `<&[T] as IntoIterator>::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
 
     // Expressions that should not
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 afdf6cb7f44..cc310191f0c 100644
--- a/src/test/ui/iterators/into-iter-on-arrays-lint.rs
+++ b/src/test/ui/iterators/into-iter-on-arrays-lint.rs
@@ -13,10 +13,10 @@ fn main() {
     //~^ 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
     big.into_iter();
-    //~^ WARNING this method call currently resolves to `<&[T] as IntoIterator>::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
     [0u8; 33].into_iter();
-    //~^ WARNING this method call currently resolves to `<&[T] as IntoIterator>::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(small).into_iter();
@@ -26,10 +26,10 @@ fn main() {
     //~^ 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 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([0u8; 33]).into_iter();
-    //~^ WARNING this method call currently resolves to `<&[T] as IntoIterator>::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(small)).into_iter();
@@ -39,10 +39,10 @@ fn main() {
     //~^ 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 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([0u8; 33])).into_iter();
-    //~^ WARNING this method call currently resolves to `<&[T] as IntoIterator>::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
 
     // Expressions that should not
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 bbec9147f57..b31f444b36e 100644
--- a/src/test/ui/iterators/into-iter-on-arrays-lint.stderr
+++ b/src/test/ui/iterators/into-iter-on-arrays-lint.stderr
@@ -17,7 +17,7 @@ LL |     [1, 2].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] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added.
+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:15:9
    |
 LL |     big.into_iter();
@@ -26,7 +26,7 @@ LL |     big.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] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added.
+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:18:15
    |
 LL |     [0u8; 33].into_iter();
@@ -53,7 +53,7 @@ LL |     Box::new([1, 2]).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] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added.
+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:28:19
    |
 LL |     Box::new(big).into_iter();
@@ -62,7 +62,7 @@ LL |     Box::new(big).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] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added.
+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:31:25
    |
 LL |     Box::new([0u8; 33]).into_iter();
@@ -89,7 +89,7 @@ LL |     Box::new(Box::new([1, 2])).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] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added.
+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:41:29
    |
 LL |     Box::new(Box::new(big)).into_iter();
@@ -98,7 +98,7 @@ LL |     Box::new(Box::new(big)).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] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added.
+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:44:35
    |
 LL |     Box::new(Box::new([0u8; 33])).into_iter();