File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed
src/collections/btree/node Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff 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]
Original file line number Diff line number Diff 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
9494fn 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 ) ;
Original file line number Diff line number Diff line change @@ -2193,6 +2193,9 @@ impl<'a> Builder<'a> {
21932193 rustflags. arg ( "-Zvalidate-mir" ) ;
21942194 rustflags. arg ( & format ! ( "-Zmir-opt-level={mir_opt_level}" ) ) ;
21952195 }
2196+ if self . config . rust_randomize_layout {
2197+ rustflags. arg ( "--cfg=randomized_layouts" ) ;
2198+ }
21962199 // Always enable inlining MIR when building the standard library.
21972200 // Without this flag, MIR inlining is disabled when incremental compilation is enabled.
21982201 // 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