diff options
author | Tim King <taking@google.com> | 2022-11-23 10:31:03 -0800 |
---|---|---|
committer | Tim King <taking@google.com> | 2022-11-30 17:03:21 +0000 |
commit | 60525dc31d9e4401d476d1ec9d91050dca700218 (patch) | |
tree | 5437091be695171a309adc9ac9641de4673ff0a2 /doc | |
parent | 78472603c6bac7a52d42d565558b9c0cb12c3f9a (diff) | |
download | go-git-60525dc31d9e4401d476d1ec9d91050dca700218.tar.gz |
spec: document conversion from slice to array
Document that a slice can be converted to either an array or a pointer
to an array of a matching underlying array type. This was documented in
the "Conversions from slice to array or array pointer" subsection, but
not in the list of conversion rules.
Updates #46505.
Change-Id: I16a89a63ef23c33580129952415e977a8f334009
Reviewed-on: https://go-review.googlesource.com/c/go/+/452936
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Tim King <taking@google.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/go_spec.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/go_spec.html b/doc/go_spec.html index 967bfc4b5c..3bc610fb02 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -5348,7 +5348,7 @@ in any of these cases: <code>x</code> is a string and <code>T</code> is a slice of bytes or runes. </li> <li> - <code>x</code> is a slice, <code>T</code> is a pointer to an array, + <code>x</code> is a slice, <code>T</code> is an array or a pointer to an array, and the slice and array types have <a href="#Type_identity">identical</a> element types. </li> </ul> |