commit ac3d9759ed6d28bb2fcb6f6f596e28ae5dae8969 (tree) parent 922d33e5b9195587afa4e97cd60c0af0212938bd Author: Exonorid <exonorid@gmail.com> Date: Sun, 16 Jan 2022 10:18:23 -0700 Added documentation for implicit struct pointer dereferencing Diffstat:
| M | doc/langref.html.in | | | 5 | +++++ |
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git 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#}