Use `()` instead of `[u8; 0]` in opaque type

pull/456/head
Thiago Trannin 4 months ago
parent 0ebdacadbd
commit 3401e89fbd

@ -891,13 +891,13 @@ To do this in Rust, lets create our own opaque types:
```rust
#[repr(C)]
pub struct Foo {
_data: [u8; 0],
_data: (),
_marker:
core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
pub struct Bar {
_data: [u8; 0],
_data: (),
_marker:
core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

Loading…
Cancel
Save