Skip to content

Commit 8440208

Browse files
committed
tidy
1 parent fcd7207 commit 8440208

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

src/test/ui/layout/unsafe-cell-hides-niche.rs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,22 @@ fn main() {
4747
assert_size!(Option< Cell<&()>>, PTR_SIZE * 2); // (✗ niche opt)
4848
assert_size!( RefCell<&()> , PTR_SIZE * 2);
4949
assert_size!(Option< RefCell<&()>>, PTR_SIZE * 3); // (✗ niche opt)
50-
assert_size!( RwLock<&()> , if cfg!(target_pointer_width = "32") { 16 } else { 24 });
51-
assert_size!(Option< RwLock<&()>>, if cfg!(target_pointer_width = "32") { 20 } else { 32 }); // (✗ niche opt)
52-
assert_size!( Mutex<&()> , if cfg!(target_pointer_width = "32") { 12 } else { 16 });
53-
assert_size!(Option< Mutex<&()>>, if cfg!(target_pointer_width = "32") { 16 } else { 24 }); // (✗ niche opt)
50+
assert_size!(
51+
RwLock<&()>,
52+
if cfg!(target_pointer_width = "32") { 16 } else { 24 }
53+
);
54+
assert_size!(
55+
Option<RwLock<&()>>,
56+
if cfg!(target_pointer_width = "32") { 20 } else { 32 }
57+
); // (✗ niche opt)
58+
assert_size!(
59+
Mutex<&()> ,
60+
if cfg!(target_pointer_width = "32") { 12 } else { 16 }
61+
);
62+
assert_size!(
63+
Option<Mutex<&()>>,
64+
if cfg!(target_pointer_width = "32") { 16 } else { 24 }
65+
); // (✗ niche opt)
5466

5567
assert_size!( UnsafeCell<&[i32]> , PTR_SIZE * 2);
5668
assert_size!(Option<UnsafeCell<&[i32]>>, PTR_SIZE * 3); // (✗ niche opt)

0 commit comments

Comments
 (0)