Skip to content

Commit

Permalink
Rollup merge of rust-lang#104093 - RalfJung:test-sizes, r=thomcc
Browse files Browse the repository at this point in the history
disable btree size tests on Miri

Seems fine not to run these in Miri, they can't have UB anyway. And this lets us do layout randomization in Miri.

r? ``@thomcc``
  • Loading branch information
GuillaumeGomez authored Nov 8, 2022
2 parents 3abf329 + 17044c1 commit afaba19
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/alloc/src/collections/btree/node/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ fn test_partial_eq() {

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

0 comments on commit afaba19

Please sign in to comment.