1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#[repr(C)] pub struct Foo<T> { something: *const i32, phantom: std::marker::PhantomData<T>, } #[repr(u8)] pub enum Bar { Min(Foo<Self>), Max(Foo<Self>), Other, } #[no_mangle] pub extern "C" fn root(b: Bar) {}