From 3e6952ad16625197d569b99e2097ccc63172e201 Mon Sep 17 00:00:00 2001 From: Exonorid Date: Sun, 16 Jan 2022 10:18:23 -0700 Subject: [PATCH] Added documentation for implicit struct pointer dereferencing --- doc/langref.html.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/langref.html.in b/doc/langref.html.in index 825d03899e..40c2e431a3 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -3159,7 +3159,12 @@ test "linked list" { .last = &node, .len = 1, }; + + // When using a pointer to a struct, fields can be accessed directly, + // without explicitly dereferencing the pointer. + // So you can do try expect(list2.first.?.data == 1234); + // instead of try expect(list2.first.?.*.data == 1234); } {#code_end#}