@@ -26,7 +26,7 @@ macro_rules! check_sizes {
2626 ( check_one_specific_size: $ty: ty, $size: expr) => {
2727 const _: Size :: <{ $size} > = Size :: <{ size_of:: <$ty>( ) } >;
2828 } ;
29- ( $ty: ty, $size: expr, $optioned_size: expr) => {
29+ ( $ty: ty: $size: expr => $optioned_size: expr) => {
3030 check_sizes!( check_one_specific_size: $ty, $size) ;
3131 check_sizes!( check_one_specific_size: Option <$ty>, $optioned_size) ;
3232 check_sizes!( check_no_niche_opt: $size != $optioned_size, $ty) ;
@@ -41,30 +41,30 @@ macro_rules! check_sizes {
4141
4242const PTR_SIZE : usize = std:: mem:: size_of :: < * const ( ) > ( ) ;
4343
44- check_sizes ! ( Wrapper <u32 >, 4 , 8 ) ;
45- check_sizes ! ( Wrapper <N32 >, 4 , 4 ) ; // (✓ niche opt)
46- check_sizes ! ( Transparent <u32 >, 4 , 8 ) ;
47- check_sizes ! ( Transparent <N32 >, 4 , 4 ) ; // (✓ niche opt)
48- check_sizes ! ( NoNiche <u32 >, 4 , 8 ) ;
49- check_sizes ! ( NoNiche <N32 >, 4 , 8 ) ;
44+ check_sizes ! ( Wrapper <u32 >: 4 => 8 ) ;
45+ check_sizes ! ( Wrapper <N32 >: 4 => 4 ) ; // (✓ niche opt)
46+ check_sizes ! ( Transparent <u32 >: 4 => 8 ) ;
47+ check_sizes ! ( Transparent <N32 >: 4 => 4 ) ; // (✓ niche opt)
48+ check_sizes ! ( NoNiche <u32 >: 4 => 8 ) ;
49+ check_sizes ! ( NoNiche <N32 >: 4 => 8 ) ;
5050
51- check_sizes ! ( UnsafeCell <u32 >, 4 , 8 ) ;
52- check_sizes ! ( UnsafeCell <N32 >, 4 , 8 ) ;
51+ check_sizes ! ( UnsafeCell <u32 >: 4 => 8 ) ;
52+ check_sizes ! ( UnsafeCell <N32 >: 4 => 8 ) ;
5353
54- check_sizes ! ( UnsafeCell <& ( ) > , PTR_SIZE , PTR_SIZE * 2 ) ;
55- check_sizes ! ( Cell <& ( ) > , PTR_SIZE , PTR_SIZE * 2 ) ;
56- check_sizes ! ( RefCell <& ( ) > , PTR_SIZE * 2 , PTR_SIZE * 3 ) ;
54+ check_sizes ! ( UnsafeCell <& ( ) >: PTR_SIZE => PTR_SIZE * 2 ) ;
55+ check_sizes ! ( Cell <& ( ) >: PTR_SIZE => PTR_SIZE * 2 ) ;
56+ check_sizes ! ( RefCell <& ( ) >: PTR_SIZE * 2 => PTR_SIZE * 3 ) ;
5757
5858check_sizes ! ( RwLock <& ( ) >) ;
5959check_sizes ! ( Mutex <& ( ) >) ;
6060
61- check_sizes ! ( UnsafeCell <& [ i32 ] > , PTR_SIZE * 2 , PTR_SIZE * 3 ) ;
62- check_sizes ! ( UnsafeCell <( & ( ) , & ( ) ) > , PTR_SIZE * 2 , PTR_SIZE * 3 ) ;
61+ check_sizes ! ( UnsafeCell <& [ i32 ] >: PTR_SIZE * 2 => PTR_SIZE * 3 ) ;
62+ check_sizes ! ( UnsafeCell <( & ( ) , & ( ) ) >: PTR_SIZE * 2 => PTR_SIZE * 3 ) ;
6363
6464trait Trait { }
65- check_sizes ! ( UnsafeCell <& dyn Trait > , PTR_SIZE * 2 , PTR_SIZE * 3 ) ;
65+ check_sizes ! ( UnsafeCell <& dyn Trait >: PTR_SIZE * 2 => PTR_SIZE * 3 ) ;
6666
6767#[ repr( simd) ]
6868pub struct Vec4 < T > ( [ T ; 4 ] ) ;
6969
70- check_sizes ! ( UnsafeCell <Vec4 <N32 >> , 16 , 32 ) ;
70+ check_sizes ! ( UnsafeCell <Vec4 <N32 >>: 16 => 32 ) ;
0 commit comments