Home | History | Annotate | Download | only in test

Lines Matching defs:escape

7 // Test escape analysis for slices.
9 package escape
20 // BAD: i should not escape
50 func slice4(s []*int) { // ERROR "s does not escape"
55 func slice5(s []*int) { // ERROR "s does not escape"
57 s = make([]*int, 10) // ERROR "make\(\[\]\*int, 10\) does not escape"
64 s := make([]*int, 10) // ERROR "make\(\[\]\*int, 10\) does not escape"
65 // BAD: i should not escape
72 s := make([]*int, 10) // ERROR "make\(\[\]\*int, 10\) does not escape"
80 s := []*int{&i} // ERROR "&i does not escape" "literal does not escape"
86 s := []*int{&i} // ERROR "&i escapes to heap" "literal does not escape"
96 func envForDir(dir string) []string { // ERROR "dir does not escape"
98 return mergeEnvLists([]string{"PWD=" + dir}, env) // ERROR ".PWD=. \+ dir escapes to heap" "\[\]string literal does not escape"
155 []resolveIPAddrTest{ // ERROR "\[\]resolveIPAddrTest literal does not escape"