1 #![allow( 2 dead_code, 3 non_snake_case, 4 non_camel_case_types, 5 non_upper_case_globals 6 )] 7 8 #[repr(C)] 9 #[derive(Debug, Copy, Clone)] 10 pub struct C<T> { 11 pub foo: *const T, 12 pub bar: *const T, 13 pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, 14 } 15 impl<T> Default for C<T> { default() -> Self16 fn default() -> Self { 17 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 18 unsafe { 19 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 20 s.assume_init() 21 } 22 } 23 } 24