From eefe6956fde0adc2b0b56fdb6d22e06e2543219e Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 11 Apr 2020 16:43:19 -0400 Subject: [PATCH] clarify what "not valid" means --- doc/langref.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index 6531323532..bb824076d6 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -8167,7 +8167,7 @@ test "vector @splat" { {#header_open|@tagName#}
{#syntax#}@tagName(value: var) []const u8{#endsyntax#}

- Converts an enum value or union value to a slice of bytes representing the name. Not valid for unamed fields in non-exhaustive enums. + Converts an enum value or union value to a slice of bytes representing the name.

If the enum is non-exhaustive and the tag value does not map to a name, it invokes safety-checked {#link|Undefined Behavior#}.

{#header_close#}