This commit is contained in:
Lokathor 2019-09-20 11:12:40 -06:00 committed by GitHub
parent d4fde53386
commit 40cb0d19c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,8 +18,8 @@ use super::*;
/// [Infallible](core::convert::Infallible)).
/// * The type must allow any bit pattern (eg: no `bool` or `char`).
/// * The type must not contain any padding bytes (eg: no `(u8, u16)`).
/// * A struct needs to be `repr(C)`, `repr(transparent)` wrapper around a
/// `Pod` type, or `repr(packed)` with all fields as `Pod` types.
/// * A struct needs to have all fields be `Pod` and be `repr(C)`,
/// `repr(transparent)`, or `repr(packed)`.
pub unsafe trait Pod: Zeroable + Copy + 'static {}
unsafe impl Pod for () {}