Skip to content

Commit 93220e5

Browse files
committed
TEST: Update tests for new MaybeUninit usage
(Also remove the size check since we can't rely on it, even if we want to ensure it has no overhead for the bytes case.)
1 parent b56c3b7 commit 93220e5

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ matrix:
1515
- rust: stable
1616
env:
1717
- FEATURES='array-sizes-33-128 array-sizes-129-255'
18+
- ARRAYVECTEST_ENSURE_MAYBEUNINIT=1
1819
- rust: beta
1920
- rust: nightly
2021
env:
@@ -23,12 +24,12 @@ matrix:
2324
- rust: nightly
2425
env:
2526
- NODROP_FEATURES='use_needs_drop'
26-
- ARRAYVECTEST_ENSURE_UNION=1
27+
- ARRAYVECTEST_ENSURE_MAYBEUNINIT=1
2728
- rust: nightly
2829
env:
2930
- FEATURES='serde use_union'
3031
- NODROP_FEATURES='use_union'
31-
- ARRAYVECTEST_ENSURE_UNION=1
32+
- ARRAYVECTEST_ENSURE_MAYBEUNINIT=1
3233
branches:
3334
only:
3435
- master

tests/tests.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -510,10 +510,8 @@ fn test_sizes_129_255() {
510510

511511

512512
#[test]
513-
fn test_nightly_uses_maybe_uninit() {
514-
if option_env!("ARRAYVECTEST_ENSURE_UNION").map(|s| !s.is_empty()).unwrap_or(false) {
515-
assert!(cfg!(has_manually_drop_in_union));
516-
type ByteArray = ArrayVec<[u8; 4]>;
517-
assert!(mem::size_of::<ByteArray>() == 5);
513+
fn test_newish_stable_uses_maybe_uninit() {
514+
if option_env!("ARRAYVECTEST_ENSURE_MAYBEUNINIT").map(|s| !s.is_empty()).unwrap_or(false) {
515+
assert!(cfg!(has_stable_maybe_uninit));
518516
}
519517
}

0 commit comments

Comments
 (0)