test: fix inline.go to pass linux-amd64-noopt
Updates #33485.
Change-Id: I3330860cdff1e9797466a7630bcdb7792c465b06
Reviewed-on: https://go-review.googlesource.com/c/go/+/254938
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
diff --git a/test/inline.go b/test/inline.go
index 1c5c1bc..3edcf2e 100644
--- a/test/inline.go
+++ b/test/inline.go
@@ -10,7 +10,6 @@
package foo
import (
- "errors"
"runtime"
"unsafe"
)
@@ -50,7 +49,7 @@
}
}
-var somethingWrong error = errors.New("something went wrong") // ERROR "can inline init" "inlining call to errors.New" "errors.errorString.* escapes to heap"
+var somethingWrong error
// local closures can be inlined
func l(x, y int) (int, int, error) {