authorgravatar for rohlemF@gmail.comrohlem <rohlemF@gmail.com> 2025-09-17 23:11:46+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-09-18 12:47:18+02:00
logac562577381f6e94196337e0ccd8895bd1bcddb2
treeff171d655a40e57d7f8a3b803ac65c64649c4ca6
parent72017d4bd5f69eb243053a76227753b69bdf6b56
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

langref: mention union support of `@fieldParentPtr`


1 files changed, 2 insertions(+), 2 deletions(-)

doc/langref.html.in+2-2
......@@ -4888,8 +4888,8 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
48884888 {#header_open|@fieldParentPtr#}
48894889 <pre>{#syntax#}@fieldParentPtr(comptime field_name: []const u8, field_ptr: *T) anytype{#endsyntax#}</pre>
48904890 <p>
4891 Given a pointer to a struct field, returns a pointer to the struct containing that field.
4892 The return type (and struct in question) is the inferred result type.
4891 Given a pointer to a struct or union field, returns a pointer to the struct or union containing that field.
4892 The return type (pointer to the parent struct or union in question) is the inferred result type.
48934893 </p>
48944894 <p>
48954895 If {#syntax#}field_ptr{#endsyntax#} does not point to the {#syntax#}field_name{#endsyntax#} field of an instance of