Fixes #2205.
Change-Id: Ib0802fee2b274798b35f0ebbd0b736b1be5ae00a
Reviewed-on: https://go-review.googlesource.com/c/go/+/520600
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Debug.PGOInline = 1
Debug.PGODevirtualize = 1
Debug.SyncFrames = -1 // disable sync markers by default
+ Debug.ZeroCopy = 1
Debug.Checkptr = -1 // so we can tell whether it is set explicitly
func stringtoslicebyte0() {
s := "foo"
- x := []byte(s) // ERROR "\(\[\]byte\)\(s\) does not escape$"
+ x := []byte(s) // ERROR "\(\[\]byte\)\(s\) does not escape$" "zero-copy string->\[\]byte conversion"
_ = x
}
func stringtoslicebyte0() {
s := "foo"
- x := []byte(s) // ERROR "\(\[\]byte\)\(s\) does not escape$"
+ x := []byte(s) // ERROR "\(\[\]byte\)\(s\) does not escape$" "zero-copy string->\[\]byte conversion"
_ = x
}