diff --git a/test/testdata/exportloopref.go b/test/testdata/exportloopref.go index 26d2af3aeb89..664c1c0e41f9 100644 --- a/test/testdata/exportloopref.go +++ b/test/testdata/exportloopref.go @@ -10,11 +10,11 @@ func dummyFunction() { println("loop expecting 10, 11, 12, 13") for i, p := range []int{10, 11, 12, 13} { printp(&p) - slice = append(slice, &p) // ERROR : exporting a pointer for the loop variable p - array[i] = &p // ERROR : exporting a pointer for the loop variable p + slice = append(slice, &p) // ERROR : "exporting a pointer for the loop variable p" + array[i] = &p // ERROR : "exporting a pointer for the loop variable p" if i%2 == 0 { - ref = &p // ERROR : exporting a pointer for the loop variable p - str.x = &p // ERROR : exporting a pointer for the loop variable p + ref = &p // ERROR : "exporting a pointer for the loop variable p" + str.x = &p // ERROR : "exporting a pointer for the loop variable p" } var vStr struct{ x *int } var vArray [4]*int