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