union_self.rs 231 B

1234567891011121314
  1. #[repr(C)]
  2. pub struct Foo<T> {
  3. something: *const i32,
  4. phantom: std::marker::PhantomData<T>,
  5. }
  6. #[repr(C)]
  7. pub union Bar {
  8. something: i32,
  9. subexpressions: Foo<Self>,
  10. }
  11. #[no_mangle]
  12. pub extern "C" fn root(b: Bar) {}