From dd651be7bc74b0d897cd0b4ec76104e51c32cb34 Mon Sep 17 00:00:00 2001 From: binarycat Date: Thu, 31 Oct 2024 11:43:45 -0500 Subject: [PATCH 1/2] update offset_of! docs to reflect the stablization of nesting --- library/core/src/mem/mod.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/library/core/src/mem/mod.rs b/library/core/src/mem/mod.rs index 74b198c4fdd41..4c4c31eaf0a82 100644 --- a/library/core/src/mem/mod.rs +++ b/library/core/src/mem/mod.rs @@ -1254,12 +1254,10 @@ impl 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 +/// 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. /// -/// However, on stable only a single field name is supported, which blocks the use of -/// enum support. -/// /// Visibility is respected - all types and fields must be visible to the call site: /// /// ``` From fc67203d59f5a314d51469ed844189191b5663f6 Mon Sep 17 00:00:00 2001 From: lolbinarycat Date: Thu, 31 Oct 2024 17:27:31 -0500 Subject: [PATCH 2/2] use semantic line break Co-authored-by: Jubilee --- library/core/src/mem/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/core/src/mem/mod.rs b/library/core/src/mem/mod.rs index 4c4c31eaf0a82..4cf52042a57f6 100644 --- a/library/core/src/mem/mod.rs +++ b/library/core/src/mem/mod.rs @@ -1255,8 +1255,8 @@ impl SizedTypeProperties for T {} /// Nested field accesses may be used, but not array indexes. /// /// 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. +/// 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: ///