diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-09-11 14:06:33 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-11 14:06:33 +1000 |
| commit | 5258dfc0b742bb814c823c4d740bff14942a8d2b (patch) | |
| tree | 48ed5397422e9ba0884837d42603ab4e4156f51b /library | |
| parent | 81840271c3e498b8bff64b3d46a53db361320d8e (diff) | |
| parent | a7528e7ec3e13ebe00c19a92381b93be8cce8ec6 (diff) | |
| download | rust-5258dfc0b742bb814c823c4d740bff14942a8d2b.tar.gz rust-5258dfc0b742bb814c823c4d740bff14942a8d2b.zip | |
Rollup merge of #146425 - ferrocene:pvdrz/improve-array-coverage, r=workingjubilee
Improve `core::array` coverage This PR improves the `core::array` coverage by adding new tests to `coretests`
Diffstat (limited to 'library')
| -rw-r--r-- | library/coretests/tests/array.rs | 7 |
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); +} |
