Skip to content
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

Merged
merged 1 commit into from
Mar 1, 2024
Merged

Document Unaligned #984

merged 1 commit into from
Mar 1, 2024

Conversation

jswrenn
Copy link
Collaborator

@jswrenn jswrenn commented Mar 1, 2024

No description provided.

@jswrenn jswrenn requested a review from joshlf March 1, 2024 16:40
@jswrenn jswrenn enabled auto-merge March 1, 2024 16:40
src/lib.rs Outdated
Comment on lines 3220 to 3222
/// 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.:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reflow this?

Copy link
Collaborator Author

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)`.
Copy link
Member

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

src/lib.rs Show resolved Hide resolved
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))`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// `repr(packed)` or ``repr(packed(1))`.
/// `repr(packed)` or `repr(packed(1))`.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops; done.

@jswrenn jswrenn added this pull request to the merge queue Mar 1, 2024
Merged via the queue into main with commit e6c0ff8 Mar 1, 2024
210 checks passed
@jswrenn jswrenn deleted the doc-unaligned branch March 1, 2024 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants