about summary refs log tree commit diff
path: root/library
diff options
context:
space:
mode:
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);
+}