From 60525dc31d9e4401d476d1ec9d91050dca700218 Mon Sep 17 00:00:00 2001 From: Tim King Date: Wed, 23 Nov 2022 10:31:03 -0800 Subject: [PATCH] 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 Reviewed-by: Robert Griesemer Run-TryBot: Tim King --- doc/go_spec.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/go_spec.html b/doc/go_spec.html index 967bfc4b5cb57..3bc610fb020ae 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -5348,7 +5348,7 @@

Conversions

x is a string and T is a slice of bytes or runes.
  • - x is a slice, T is a pointer to an array, + x is a slice, T is an array or a pointer to an array, and the slice and array types have identical element types.