2020-08-21 01:04:36 +00:00
|
|
|
#![cfg(feature = "derive")]
|
|
|
|
#![allow(dead_code)]
|
|
|
|
|
2022-11-17 20:13:24 +00:00
|
|
|
use bytemuck::{ByteEq, ByteHash, Pod, TransparentWrapper, Zeroable};
|
2020-08-21 01:04:36 +00:00
|
|
|
|
2022-11-17 20:13:24 +00:00
|
|
|
#[derive(Copy, Clone, Pod, Zeroable, ByteEq, ByteHash)]
|
2020-08-21 01:04:36 +00:00
|
|
|
#[repr(C)]
|
|
|
|
struct Test {
|
|
|
|
a: u16,
|
|
|
|
b: u16,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(TransparentWrapper)]
|
|
|
|
#[repr(transparent)]
|
|
|
|
struct TransparentSingle {
|
|
|
|
a: u16,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(TransparentWrapper)]
|
|
|
|
#[repr(transparent)]
|
|
|
|
#[transparent(u16)]
|
|
|
|
struct TransparentWithZeroSized {
|
|
|
|
a: u16,
|
2021-03-29 05:11:13 +00:00
|
|
|
b: (),
|
|
|
|
}
|