mention repr(packed)

This commit is contained in:
Lokathor 2019-09-20 11:09:33 -06:00 committed by GitHub
parent 28603a3198
commit ca902ff52d
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)`, or a `repr(transparent)` wrapper around a
/// `Pod` type.
/// * A struct needs to be `repr(C)`, `repr(transparent)` wrapper around a
/// `Pod` type, or `repr(packed)` with all fields as `Pod` types.
pub unsafe trait Pod: Zeroable + Copy + 'static {}
unsafe impl Pod for () {}