aboutsummaryrefslogtreecommitdiff
path: root/test/escape_slice.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/escape_slice.go')
-rw-r--r--test/escape_slice.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/escape_slice.go b/test/escape_slice.go
index d2cdaa6a01..6ce852e9c5 100644
--- a/test/escape_slice.go
+++ b/test/escape_slice.go
@@ -77,19 +77,19 @@ func slice7() *int {
func slice8() {
i := 0
- s := []*int{&i} // ERROR "literal does not escape"
+ s := []*int{&i} // ERROR "\[\]\*int{...} does not escape"
_ = s
}
func slice9() *int {
i := 0 // ERROR "moved to heap: i"
- s := []*int{&i} // ERROR "literal does not escape"
+ s := []*int{&i} // ERROR "\[\]\*int{...} does not escape"
return s[0]
}
func slice10() []*int {
i := 0 // ERROR "moved to heap: i"
- s := []*int{&i} // ERROR "literal escapes to heap"
+ s := []*int{&i} // ERROR "\[\]\*int{...} escapes to heap"
return s
}
@@ -103,7 +103,7 @@ func slice11() {
func envForDir(dir string) []string { // ERROR "dir does not escape"
env := os.Environ()
- return mergeEnvLists([]string{"PWD=" + dir}, env) // ERROR ".PWD=. \+ dir escapes to heap" "\[\]string literal does not escape"
+ return mergeEnvLists([]string{"PWD=" + dir}, env) // ERROR ".PWD=. \+ dir escapes to heap" "\[\]string{...} does not escape"
}
func mergeEnvLists(in, out []string) []string { // ERROR "leaking param content: in" "leaking param content: out" "leaking param: out to result ~r2 level=0"
@@ -160,14 +160,14 @@ var resolveIPAddrTests = []resolveIPAddrTest{
func setupTestData() {
resolveIPAddrTests = append(resolveIPAddrTests,
- []resolveIPAddrTest{ // ERROR "\[\]resolveIPAddrTest literal does not escape"
+ []resolveIPAddrTest{ // ERROR "\[\]resolveIPAddrTest{...} does not escape"
{"ip",
"localhost",
- &IPAddr{IP: IPv4(127, 0, 0, 1)}, // ERROR "&IPAddr literal escapes to heap"
+ &IPAddr{IP: IPv4(127, 0, 0, 1)}, // ERROR "&IPAddr{...} escapes to heap"
nil},
{"ip4",
"localhost",
- &IPAddr{IP: IPv4(127, 0, 0, 1)}, // ERROR "&IPAddr literal escapes to heap"
+ &IPAddr{IP: IPv4(127, 0, 0, 1)}, // ERROR "&IPAddr{...} escapes to heap"
nil},
}...)
}