]> Cypherpunks repositories - gostls13.git/commitdiff
reflect: remove deprecation notices from SliceHeader, StringHeader
authorRuss Cox <rsc@golang.org>
Tue, 22 Nov 2022 15:22:00 +0000 (10:22 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 23 Nov 2022 20:08:03 +0000 (20:08 +0000)
There has been no proposal discussion about adding these notices.
Also, even if we did decide to add them, then since their replacements
are only appearing in Go 1.20, go.dev/wiki/Deprecation says that we
should wait until Go 1.22 to add the deprecation notice.

Filed #56906 for the proposal discussion.

Fixes #56905.

Change-Id: If86cce65aa00b4b62b2b18e82503431dcbdbcfed
Reviewed-on: https://go-review.googlesource.com/c/go/+/452761
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/reflect/value.go

index c27e517411ba85042c94b6d10644c7afc6ccda9b..2c6ce4ad126d8b04d59c4b05320f3e57b5351047 100644 (file)
@@ -2743,7 +2743,7 @@ func (v Value) UnsafePointer() unsafe.Pointer {
 // it references will not be garbage collected, so programs must keep
 // a separate, correctly typed pointer to the underlying data.
 //
-// Deprecated: Use unsafe.String or unsafe.StringData instead.
+// In new code, use unsafe.String or unsafe.StringData instead.
 type StringHeader struct {
        Data uintptr
        Len  int
@@ -2756,7 +2756,7 @@ type StringHeader struct {
 // it references will not be garbage collected, so programs must keep
 // a separate, correctly typed pointer to the underlying data.
 //
-// Deprecated: Use unsafe.Slice or unsafe.SliceData instead.
+// In new code, use unsafe.Slice or unsafe.SliceData instead.
 type SliceHeader struct {
        Data uintptr
        Len  int