@@ -20,7 +20,7 @@ pub type uint32_t = u32;
2020pub type uint64_t = u64 ;
2121
2222cfg_if ! {
23- if #[ cfg( all( libc_int128 , target_arch = "aarch64" , not( target_os = "windows" ) ) ) ] {
23+ if #[ cfg( all( target_arch = "aarch64" , not( target_os = "windows" ) ) ) ] {
2424 // This introduces partial support for FFI with __int128 and
2525 // equivalent types on platforms where Rust's definition is validated
2626 // to match the standard C ABI of that platform.
@@ -59,41 +59,38 @@ cfg_if! {
5959 /// C __uint128_t (alternate name for [__uint128][])
6060 pub type __uint128_t = u128 ;
6161
62- cfg_if! {
63- if #[ cfg( libc_underscore_const_names) ] {
64- macro_rules! static_assert_eq {
65- ( $a: expr, $b: expr) => {
66- const _: [ ( ) ; $a] = [ ( ) ; $b] ;
67- } ;
68- }
62+ macro_rules! static_assert_eq {
63+ ( $a: expr, $b: expr) => {
64+ const _: [ ( ) ; $a] = [ ( ) ; $b] ;
65+ } ;
66+ }
6967
70- // NOTE: if you add more platforms to here, you may need to cfg
71- // these consts. They should always match the platform's values
72- // for `sizeof(__int128)` and `_Alignof(__int128)`.
73- const _SIZE_128: usize = 16 ;
74- const _ALIGN_128: usize = 16 ;
68+ // NOTE: if you add more platforms to here, you may need to cfg
69+ // these consts. They should always match the platform's values
70+ // for `sizeof(__int128)` and `_Alignof(__int128)`.
71+ const _SIZE_128: usize = 16 ;
72+ const _ALIGN_128: usize = 16 ;
7573
76- // Since Rust doesn't officially guarantee that these types
77- // have compatible ABIs, we const assert that these values have the
78- // known size/align of the target platform's libc. If rustc ever
79- // tries to regress things, it will cause a compilation error.
80- //
81- // This isn't a bullet-proof solution because e.g. it doesn't
82- // catch the fact that llvm and gcc disagree on how x64 __int128
83- // is actually *passed* on the stack (clang underaligns it for
84- // the same reason that rustc *never* properly aligns it).
85- static_assert_eq!( core:: mem:: size_of:: <__int128>( ) , _SIZE_128) ;
86- static_assert_eq!( core:: mem:: align_of:: <__int128>( ) , _ALIGN_128) ;
74+ // Since Rust doesn't officially guarantee that these types
75+ // have compatible ABIs, we const assert that these values have the
76+ // known size/align of the target platform's libc. If rustc ever
77+ // tries to regress things, it will cause a compilation error.
78+ //
79+ // This isn't a bullet-proof solution because e.g. it doesn't
80+ // catch the fact that llvm and gcc disagree on how x64 __int128
81+ // is actually *passed* on the stack (clang underaligns it for
82+ // the same reason that rustc *never* properly aligns it).
83+ // FIXME: temporarily disabled because of a ctest2 bug.
84+ // static_assert_eq!(core::mem::size_of::<__int128>(), _SIZE_128);
85+ // static_assert_eq!(core::mem::align_of::<__int128>(), _ALIGN_128);
8786
88- static_assert_eq!( core:: mem:: size_of:: <__uint128>( ) , _SIZE_128) ;
89- static_assert_eq!( core:: mem:: align_of:: <__uint128>( ) , _ALIGN_128) ;
87+ // static_assert_eq!(core::mem::size_of::<__uint128>(), _SIZE_128);
88+ // static_assert_eq!(core::mem::align_of::<__uint128>(), _ALIGN_128);
9089
91- static_assert_eq!( core:: mem:: size_of:: <__int128_t>( ) , _SIZE_128) ;
92- static_assert_eq!( core:: mem:: align_of:: <__int128_t>( ) , _ALIGN_128) ;
90+ // static_assert_eq!(core::mem::size_of::<__int128_t>(), _SIZE_128);
91+ // static_assert_eq!(core::mem::align_of::<__int128_t>(), _ALIGN_128);
9392
94- static_assert_eq!( core:: mem:: size_of:: <__uint128_t>( ) , _SIZE_128) ;
95- static_assert_eq!( core:: mem:: align_of:: <__uint128_t>( ) , _ALIGN_128) ;
96- }
97- }
93+ // static_assert_eq!(core::mem::size_of::<__uint128_t>(), _SIZE_128);
94+ // static_assert_eq!(core::mem::align_of::<__uint128_t>(), _ALIGN_128);
9895 }
9996}
0 commit comments