Skip to content

Commit 64c1db2

Browse files
committed
when -Zrandomize-layout is enabled disable alloc test testing internal struct sizes
1 parent ae18edf commit 64c1db2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: alloc/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,5 @@ check-cfg = [
5252
'cfg(no_global_oom_handling)',
5353
'cfg(no_rc)',
5454
'cfg(no_sync)',
55+
'cfg(randomized_layouts)',
5556
]

Diff for: alloc/src/collections/btree/node/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ fn test_partial_eq() {
9090

9191
#[test]
9292
#[cfg(target_arch = "x86_64")]
93-
#[cfg_attr(miri, ignore)] // We'd like to run Miri with layout randomization
93+
#[cfg_attr(any(miri, randomized_layouts), ignore)] // We'd like to run Miri with layout randomization
9494
fn test_sizes() {
9595
assert_eq!(core::mem::size_of::<LeafNode<(), ()>>(), 16);
9696
assert_eq!(core::mem::size_of::<LeafNode<i64, i64>>(), 16 + CAPACITY * 2 * 8);

0 commit comments

Comments
 (0)