There was an error while loading. Please reload this page.
TaggedStructure
1 parent b681cbf commit 386b192Copy full SHA for 386b192
1 file changed
sys/src/api/mod.rs
@@ -19,11 +19,14 @@ type ReturnCode_t = ReturnCode;
19
/// # Safety
20
/// This trait must only be implemented for types that contain a [`Header`], have a valid
21
/// [`StructType_t`], and are safe to be zero-initialized.
22
-pub unsafe trait TaggedStructure: Sized {
+pub unsafe trait TaggedStructure {
23
const TAG: StructType_t;
24
fn header_mut(&mut self) -> &mut Header;
25
26
- fn new() -> Self {
+ fn new() -> Self
27
+ where
28
+ Self: Sized,
29
+ {
30
// Original bindgen implementation
31
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
32
let mut s = unsafe {
0 commit comments