xref: /aosp_15_r20/external/cronet/third_party/rust/chromium_crates_io/vendor/cxx-1.0.120/src/opaque.rs (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 #![allow(missing_docs)]
2 
3 use crate::void;
4 use core::marker::{PhantomData, PhantomPinned};
5 use core::mem;
6 
7 // . size = 0
8 // . align = 1
9 // . ffi-safe
10 // . !Send
11 // . !Sync
12 // . !Unpin
13 #[repr(C, packed)]
14 pub struct Opaque {
15     _private: [*const void; 0],
16     _pinned: PhantomData<PhantomPinned>,
17 }
18 
19 const_assert_eq!(0, mem::size_of::<Opaque>());
20 const_assert_eq!(1, mem::align_of::<Opaque>());
21