diff --git a/library/alloc/src/vec/partial_eq.rs b/library/alloc/src/vec/partial_eq.rs index 204e5678a69d6..f77287d72a0cf 100644 --- a/library/alloc/src/vec/partial_eq.rs +++ b/library/alloc/src/vec/partial_eq.rs @@ -34,12 +34,12 @@ __impl_slice_eq1! { [] Cow<'_, [T]>, &[U] where T: Clone, #[stable(feature = "ru __impl_slice_eq1! { [] Cow<'_, [T]>, &mut [U] where T: Clone, #[stable(feature = "rust1", since = "1.0.0")] } __impl_slice_eq1! { const, [A: Allocator, const N: usize] Vec, [U; N], #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] #[stable(feature = "rust1", since = "1.0.0")] } __impl_slice_eq1! { const, [A: Allocator, const N: usize] Vec, &[U; N], #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] #[stable(feature = "rust1", since = "1.0.0")] } +__impl_slice_eq1! { const, [const N: usize] [T; N], Vec, #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] #[stable(feature = "array_vec_partialeq", since = "CURRENT_RUSTC_VERSION")]} +__impl_slice_eq1! { const, [const N: usize] &[T; N], Vec, #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] #[stable(feature = "array_vec_partialeq", since = "CURRENT_RUSTC_VERSION")]} // NOTE: some less important impls are omitted to reduce code bloat // FIXME(Centril): Reconsider this? //__impl_slice_eq1! { [const N: usize] Vec, &mut [B; N], } -//__impl_slice_eq1! { [const N: usize] [A; N], Vec, } -//__impl_slice_eq1! { [const N: usize] &[A; N], Vec, } //__impl_slice_eq1! { [const N: usize] &mut [A; N], Vec, } //__impl_slice_eq1! { [const N: usize] Cow<'a, [A]>, [B; N], } //__impl_slice_eq1! { [const N: usize] Cow<'a, [A]>, &[B; N], } diff --git a/tests/ui/consts/too_generic_eval_ice.current.stderr b/tests/ui/consts/too_generic_eval_ice.current.stderr index 02bcaee80154f..00a9d714c273b 100644 --- a/tests/ui/consts/too_generic_eval_ice.current.stderr +++ b/tests/ui/consts/too_generic_eval_ice.current.stderr @@ -30,6 +30,7 @@ LL | [5; Self::HOST_SIZE] == [6; 0] | = help: the trait `PartialEq<[{integer}; 0]>` is not implemented for `[{integer}; Self::HOST_SIZE]` = help: the following other types implement trait `PartialEq`: + `&[T; N]` implements `PartialEq>` `&[T]` implements `PartialEq>` `&[T]` implements `PartialEq<[U; N]>` `&[u8; N]` implements `PartialEq` @@ -37,8 +38,7 @@ LL | [5; Self::HOST_SIZE] == [6; 0] `&[u8]` implements `PartialEq` `&[u8]` implements `PartialEq` `&mut [T]` implements `PartialEq>` - `&mut [T]` implements `PartialEq<[U; N]>` - and 11 others + and 13 others error: aborting due to 4 previous errors diff --git a/tests/ui/macros/assert-ne-no-invalid-help-issue-146204.stderr b/tests/ui/macros/assert-ne-no-invalid-help-issue-146204.stderr index 359deee7bee4b..a979992d4c848 100644 --- a/tests/ui/macros/assert-ne-no-invalid-help-issue-146204.stderr +++ b/tests/ui/macros/assert-ne-no-invalid-help-issue-146204.stderr @@ -6,6 +6,7 @@ LL | assert_ne!(buf, b"----"); | = help: the trait `PartialEq<&[u8; 4]>` is not implemented for `[u8; 4]` = help: the following other types implement trait `PartialEq`: + `&[T; N]` implements `PartialEq>` `&[T]` implements `PartialEq>` `&[T]` implements `PartialEq<[U; N]>` `&[u8; N]` implements `PartialEq` @@ -13,8 +14,7 @@ LL | assert_ne!(buf, b"----"); `&[u8]` implements `PartialEq` `&[u8]` implements `PartialEq` `&mut [T]` implements `PartialEq>` - `&mut [T]` implements `PartialEq<[U; N]>` - and 11 others + and 13 others error[E0277]: can't compare `[u8; 4]` with `&[u8; 4]` --> $DIR/assert-ne-no-invalid-help-issue-146204.rs:19:5 @@ -24,6 +24,7 @@ LL | assert_eq!(buf, b"----"); | = help: the trait `PartialEq<&[u8; 4]>` is not implemented for `[u8; 4]` = help: the following other types implement trait `PartialEq`: + `&[T; N]` implements `PartialEq>` `&[T]` implements `PartialEq>` `&[T]` implements `PartialEq<[U; N]>` `&[u8; N]` implements `PartialEq` @@ -31,8 +32,7 @@ LL | assert_eq!(buf, b"----"); `&[u8]` implements `PartialEq` `&[u8]` implements `PartialEq` `&mut [T]` implements `PartialEq>` - `&mut [T]` implements `PartialEq<[U; N]>` - and 11 others + and 13 others error[E0277]: can't compare `[u8; 4]` with `&[u8; 4]` --> $DIR/assert-ne-no-invalid-help-issue-146204.rs:5:30