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

update offset_of! docs to reflect the stabilization of nesting #132413

Merged
merged 2 commits into from
Nov 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions library/core/src/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1254,11 +1254,9 @@ impl<T> SizedTypeProperties for T {}
///
/// Nested field accesses may be used, but not array indexes.
///
/// Enum variants may be traversed as if they were fields. Variants themselves do
/// not have an offset.
///
/// However, on stable only a single field name is supported, which blocks the use of
/// enum support.
/// If the nightly-only feature `offset_of_enum` is enabled,
/// variants may be traversed as if they were fields.
/// Variants themselves do not have an offset.
///
/// Visibility is respected - all types and fields must be visible to the call site:
///
Expand Down
Loading