aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-06-21 22:20:11 -0700
committerRobert Griesemer <gri@golang.org>2021-06-22 16:01:58 +0000
commit5bd09e5efccf0d3df89085c9f214f94017f6e969 (patch)
treef581cb431452ea1053ba9662c3773e7726fee23c /doc
parent666315b4d38b99931bb9fd158a76e59928fd2852 (diff)
downloadgo-5bd09e5efccf0d3df89085c9f214f94017f6e969.tar.gz
go-5bd09e5efccf0d3df89085c9f214f94017f6e969.zip
spec: unsafe.Add/Slice are not permitted in statement context
Add unsafe.Add and unsafe.Slice to the list of built-in functions which are not permitted in statement context. The compiler and type checker already enforce this restriction, this just fixes a documentation oversight. For #19367. For #40481. Change-Id: Iabc63a8db048eaf40a5f5b5573fdf00b79d54119 Reviewed-on: https://go-review.googlesource.com/c/go/+/329925 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Rob Pike <r@golang.org> TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/go_spec.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/go_spec.html b/doc/go_spec.html
index 561d44271a..b59b37fd55 100644
--- a/doc/go_spec.html
+++ b/doc/go_spec.html
@@ -1,6 +1,6 @@
<!--{
"Title": "The Go Programming Language Specification",
- "Subtitle": "Version of Jun 2, 2021",
+ "Subtitle": "Version of Jun 22, 2021",
"Path": "/ref/spec"
}-->
@@ -4670,7 +4670,7 @@ The following built-in functions are not permitted in statement context:
<pre>
append cap complex imag len make new real
-unsafe.Alignof unsafe.Offsetof unsafe.Sizeof
+unsafe.Add unsafe.Alignof unsafe.Offsetof unsafe.Sizeof unsafe.Slice
</pre>
<pre>