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.)
This commit is contained in:
+3
-2
@@ -15,6 +15,7 @@ matrix:
|
|||||||
- rust: stable
|
- rust: stable
|
||||||
env:
|
env:
|
||||||
- FEATURES='array-sizes-33-128 array-sizes-129-255'
|
- FEATURES='array-sizes-33-128 array-sizes-129-255'
|
||||||
|
- ARRAYVECTEST_ENSURE_MAYBEUNINIT=1
|
||||||
- rust: beta
|
- rust: beta
|
||||||
- rust: nightly
|
- rust: nightly
|
||||||
env:
|
env:
|
||||||
@@ -23,12 +24,12 @@ matrix:
|
|||||||
- rust: nightly
|
- rust: nightly
|
||||||
env:
|
env:
|
||||||
- NODROP_FEATURES='use_needs_drop'
|
- NODROP_FEATURES='use_needs_drop'
|
||||||
- ARRAYVECTEST_ENSURE_UNION=1
|
- ARRAYVECTEST_ENSURE_MAYBEUNINIT=1
|
||||||
- rust: nightly
|
- rust: nightly
|
||||||
env:
|
env:
|
||||||
- FEATURES='serde use_union'
|
- FEATURES='serde use_union'
|
||||||
- NODROP_FEATURES='use_union'
|
- NODROP_FEATURES='use_union'
|
||||||
- ARRAYVECTEST_ENSURE_UNION=1
|
- ARRAYVECTEST_ENSURE_MAYBEUNINIT=1
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
|||||||
+3
-5
@@ -510,10 +510,8 @@ fn test_sizes_129_255() {
|
|||||||
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_nightly_uses_maybe_uninit() {
|
fn test_newish_stable_uses_maybe_uninit() {
|
||||||
if option_env!("ARRAYVECTEST_ENSURE_UNION").map(|s| !s.is_empty()).unwrap_or(false) {
|
if option_env!("ARRAYVECTEST_ENSURE_MAYBEUNINIT").map(|s| !s.is_empty()).unwrap_or(false) {
|
||||||
assert!(cfg!(has_manually_drop_in_union));
|
assert!(cfg!(has_stable_maybe_uninit));
|
||||||
type ByteArray = ArrayVec<[u8; 4]>;
|
|
||||||
assert!(mem::size_of::<ByteArray>() == 5);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user