Merge pull request #5645 from Sobeston/patch-7

langref - document that This works on enums too
This commit is contained in:
Veikka Tuominen
2020-06-20 11:34:07 +00:00
committed by GitHub

View File

@@ -8204,7 +8204,7 @@ test "vector @splat" {
{#header_open|@This#}
<pre>{#syntax#}@This() type{#endsyntax#}</pre>
<p>
Returns the innermost struct or union that this function call is inside.
Returns the innermost struct, enum, or union that this function call is inside.
This can be useful for an anonymous struct that needs to refer to itself:
</p>
{#code_begin|test#}