From a7528e7ec3e13ebe00c19a92381b93be8cce8ec6 Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Wed, 10 Sep 2025 16:41:13 -0500 Subject: [PATCH] Improve `core::array` coverage --- library/coretests/tests/array.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/library/coretests/tests/array.rs b/library/coretests/tests/array.rs index 30ccbbc320318..c4a8fc74feca3 100644 --- a/library/coretests/tests/array.rs +++ b/library/coretests/tests/array.rs @@ -717,3 +717,10 @@ fn array_map_drops_unmapped_elements_on_panic() { assert_eq!(counter.load(Ordering::SeqCst), MAX); } } + +// This covers the `PartialEq::<[T]>::eq` impl for `[T; N]` when it returns false. +#[test] +fn array_eq() { + let not_true = [0u8] == [].as_slice(); + assert!(!not_true); +}