File tree 3 files changed +5
-1
lines changed
src/collections/btree/node
3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -52,4 +52,5 @@ check-cfg = [
52
52
' cfg(no_global_oom_handling)' ,
53
53
' cfg(no_rc)' ,
54
54
' cfg(no_sync)' ,
55
+ ' cfg(randomized_layouts)' ,
55
56
]
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ fn test_partial_eq() {
90
90
91
91
#[ test]
92
92
#[ 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
94
94
fn test_sizes ( ) {
95
95
assert_eq ! ( core:: mem:: size_of:: <LeafNode <( ) , ( ) >>( ) , 16 ) ;
96
96
assert_eq ! ( core:: mem:: size_of:: <LeafNode <i64 , i64 >>( ) , 16 + CAPACITY * 2 * 8 ) ;
Original file line number Diff line number Diff line change @@ -2193,6 +2193,9 @@ impl<'a> Builder<'a> {
2193
2193
rustflags. arg ( "-Zvalidate-mir" ) ;
2194
2194
rustflags. arg ( & format ! ( "-Zmir-opt-level={mir_opt_level}" ) ) ;
2195
2195
}
2196
+ if self . config . rust_randomize_layout {
2197
+ rustflags. arg ( "--cfg=randomized_layouts" ) ;
2198
+ }
2196
2199
// Always enable inlining MIR when building the standard library.
2197
2200
// Without this flag, MIR inlining is disabled when incremental compilation is enabled.
2198
2201
// That causes some mir-opt tests which inline functions from the standard library to
You can’t perform that action at this time.
0 commit comments