aboutsummaryrefslogtreecommitdiff
path: root/test/escape4.go
diff options
context:
space:
mode:
authorCuong Manh Le <cuong.manhle.vn@gmail.com>2023-02-01 02:11:01 +0700
committerGopher Robot <gobot@golang.org>2023-01-31 20:36:55 +0000
commitac7efcb0caac712395adf602f69d2ff3ace6e16e (patch)
tree812f7a8888f39bdc249687d83cdf7bd09e64a5fd /test/escape4.go
parent3e1478ef0d4e98e5655afdee6efec2fc886d66fc (diff)
downloadgo-ac7efcb0caac712395adf602f69d2ff3ace6e16e.tar.gz
go-ac7efcb0caac712395adf602f69d2ff3ace6e16e.zip
test: enable inlining tests for functions with local type
Updates #57410 Change-Id: Ibe1f5523a4635d2b844b9a5db94514e07eb0bc0f Reviewed-on: https://go-review.googlesource.com/c/go/+/463998 Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'test/escape4.go')
-rw-r--r--test/escape4.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/test/escape4.go b/test/escape4.go
index e381248476..710eb75126 100644
--- a/test/escape4.go
+++ b/test/escape4.go
@@ -38,11 +38,7 @@ func f2() {} // ERROR "can inline f2"
func f3() { panic(1) } // ERROR "can inline f3" "1 escapes to heap"
func f4() { recover() }
-// TODO(cuonglm): remove f5, f6 //go:noinline and update the error message
-// once GOEXPERIMENT=nounified is gone.
-
-//go:noinline
-func f5() *byte {
+func f5() *byte { // ERROR "can inline f5"
type T struct {
x [1]byte
}
@@ -50,8 +46,7 @@ func f5() *byte {
return &t.x[0]
}
-//go:noinline
-func f6() *byte {
+func f6() *byte { // ERROR "can inline f6"
type T struct {
x struct {
y byte