diff --git a/library/core/src/array/equality.rs b/library/core/src/array/equality.rs index ec79a657e58e2..ae1c19a4cb56b 100644 --- a/library/core/src/array/equality.rs +++ b/library/core/src/array/equality.rs @@ -124,6 +124,23 @@ where } } +#[stable(feature = "rust1", since = "1.0.0")] +impl PartialEq> for [T; N] +where + T: PartialEq, +{ + #[inline] + fn eq(&self, other: &Vec) -> bool { + self[..] == other[..] + } + + #[inline] + fn ne(&self, other: &Vec) -> bool { + self[..] != other[..] + } +} + + // NOTE: some less important impls are omitted to reduce code bloat // __impl_slice_eq2! { [A; $N], &'b [B; $N] } // __impl_slice_eq2! { [A; $N], &'b mut [B; $N] }