-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document Unaligned
#984
Document Unaligned
#984
Conversation
src/lib.rs
Outdated
/// This derive analyzes, at compile time, whether the annotated type satisfies | ||
/// the [safety conditions] of `Unaligned` and implements `Unaligned` if it is sound | ||
/// to do so. This derive can be applied to structs, enums, and unions; e.g.: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reflow this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/lib.rs
Outdated
/// - If the type is `repr(C)` or `repr(transparent)`, all fields must be | ||
/// [`Unaligned`]. | ||
/// - If the type is not `repr(C)` or `repr(transparent)`, it must be | ||
/// `repr(packed)`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mention repr(packed(N))
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/lib.rs
Outdated
/// - If the type is `repr(C)` or `repr(transparent)`, all fields must be | ||
/// [`Unaligned`]. | ||
/// - If the type is not `repr(C)` or `repr(transparent)`, it must be | ||
/// `repr(packed)` or ``repr(packed(1))`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// `repr(packed)` or ``repr(packed(1))`. | |
/// `repr(packed)` or `repr(packed(1))`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops; done.
No description provided.