about summary refs log tree commit diff
path: root/library
diff options
context:
space:
mode:
authorChristian Poveda <christian.poveda@ferrous-systems.com>2025-09-10 16:41:13 -0500
committerChristian Poveda <christian.poveda@ferrous-systems.com>2025-09-10 17:25:24 -0500
commita7528e7ec3e13ebe00c19a92381b93be8cce8ec6 (patch)
tree2b86226ec3cacabe21685fc269f1767b46aefcaf /library
parent565a9ca63e9df4b223fed0da01f15e578acfb538 (diff)
downloadrust-a7528e7ec3e13ebe00c19a92381b93be8cce8ec6.tar.gz
rust-a7528e7ec3e13ebe00c19a92381b93be8cce8ec6.zip
Improve `core::array` coverage
Diffstat (limited to 'library')
-rw-r--r--library/coretests/tests/array.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/library/coretests/tests/array.rs b/library/coretests/tests/array.rs
index 30ccbbc3203..c4a8fc74fec 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);
+}